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/card.tsx | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

(limited to 'src/components/molecules/layout/card.tsx')

diff --git a/src/components/molecules/layout/card.tsx b/src/components/molecules/layout/card.tsx
index 50431d8..c342d0e 100644
--- a/src/components/molecules/layout/card.tsx
+++ b/src/components/molecules/layout/card.tsx
@@ -1,10 +1,9 @@
 import { FC } from 'react';
-import { type Image } from '../../../types/app';
-import ButtonLink from '../../atoms/buttons/button-link';
-import Heading, { type HeadingLevel } from '../../atoms/headings/heading';
-import ResponsiveImage from '../images/responsive-image';
+import { type Image } from '../../../types';
+import { ButtonLink, Heading, type HeadingLevel } from '../../atoms';
+import { ResponsiveImage } from '../images';
+import { Meta, type MetaData } from './meta';
 import styles from './card.module.scss';
-import Meta, { type MetaData } from './meta';
 
 export type CardProps = {
   /**
@@ -46,7 +45,7 @@ export type CardProps = {
  *
  * Render a link with minimal information about its content.
  */
-const Card: FC<CardProps> = ({
+export const Card: FC<CardProps> = ({
   className = '',
   cover,
   id,
@@ -59,8 +58,8 @@ const Card: FC<CardProps> = ({
   return (
     <ButtonLink
       aria-labelledby={`${id}-heading`}
-      target={url}
       className={`${styles.wrapper} ${className}`}
+      target={url}
     >
       <article className={styles.article}>
         <header className={styles.header}>
@@ -91,5 +90,3 @@ const Card: FC<CardProps> = ({
     </ButtonLink>
   );
 };
-
-export default Card;
-- 
cgit v1.2.3

