From f861e6a269ba9f62700776d3cd13b644a9e836d4 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
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<FlippingLogoProps, 'photo'> & {
@@ -30,7 +30,7 @@ export type BrandingProps = Pick<FlippingLogoProps, 'photo'> & {
  *
  * Render the branding logo, title and optional baseline.
  */
-const Branding: FC<BrandingProps> = ({
+export const Branding: FC<BrandingProps> = ({
   baseline,
   isHome = false,
   photo,
@@ -79,18 +79,18 @@ const Branding: FC<BrandingProps> = ({
   return (
     <div className={styles.wrapper}>
       <FlippingLogo
-        className={styles.logo}
+        {...props}
         altText={altText}
+        className={styles.logo}
         logoTitle={logoTitle}
         photo={photo}
         ref={logoRef}
-        {...props}
       />
       <Heading
+        className={styles.title}
         isFake={!isHome}
         level={1}
         withMargin={false}
-        className={styles.title}
         ref={titleRef}
       >
         {withLink ? (
@@ -103,10 +103,10 @@ const Branding: FC<BrandingProps> = ({
       </Heading>
       {baseline && (
         <Heading
+          className={styles.baseline}
           isFake={true}
           level={4}
           withMargin={false}
-          className={styles.baseline}
           ref={baselineRef}
         >
           {baseline}
@@ -115,5 +115,3 @@ const Branding: FC<BrandingProps> = ({
     </div>
   );
 };
-
-export default Branding;
-- 
cgit v1.2.3

