From f861e6a269ba9f62700776d3cd13b644a9e836d4 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 20 Sep 2023 16:38:54 +0200 Subject: refactor: use named export for everything except pages Next expect a default export for pages so only those components should use default exports. Everything else should use named exports to reduce the number of import statements. --- src/components/molecules/layout/branding.tsx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/components/molecules/layout/branding.tsx') diff --git a/src/components/molecules/layout/branding.tsx b/src/components/molecules/layout/branding.tsx index 10574ab..b105796 100644 --- a/src/components/molecules/layout/branding.tsx +++ b/src/components/molecules/layout/branding.tsx @@ -1,9 +1,9 @@ import Link from 'next/link'; import { FC, useRef } from 'react'; import { useIntl } from 'react-intl'; -import useStyles from '../../../utils/hooks/use-styles'; -import Heading from '../../atoms/headings/heading'; -import FlippingLogo, { type FlippingLogoProps } from '../images/flipping-logo'; +import { useStyles } from '../../../utils/hooks'; +import { Heading } from '../../atoms'; +import { FlippingLogo, type FlippingLogoProps } from '../images'; import styles from './branding.module.scss'; export type BrandingProps = Pick & { @@ -30,7 +30,7 @@ export type BrandingProps = Pick & { * * Render the branding logo, title and optional baseline. */ -const Branding: FC = ({ +export const Branding: FC = ({ baseline, isHome = false, photo, @@ -79,18 +79,18 @@ const Branding: FC = ({ return (
{withLink ? ( @@ -103,10 +103,10 @@ const Branding: FC = ({ {baseline && ( {baseline} @@ -115,5 +115,3 @@ const Branding: FC = ({
); }; - -export default Branding; -- cgit v1.2.3