From 947830904239d51ec9e94971fed6346c1089911f Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Mon, 23 Jan 2023 19:01:28 +0100
Subject: chore: make Links and Images compliant with Next.js 13

---
 src/components/molecules/layout/card.tsx | 19 +++----------------
 1 file changed, 3 insertions(+), 16 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 c48bc18..d03b8b7 100644
--- a/src/components/molecules/layout/card.tsx
+++ b/src/components/molecules/layout/card.tsx
@@ -2,9 +2,7 @@ import ButtonLink from '@components/atoms/buttons/button-link';
 import Heading, { type HeadingLevel } from '@components/atoms/headings/heading';
 import { type Image } from '@ts/types/app';
 import { FC } from 'react';
-import ResponsiveImage, {
-  type ResponsiveImageProps,
-} from '../images/responsive-image';
+import ResponsiveImage from '../images/responsive-image';
 import styles from './card.module.scss';
 import Meta, { type MetaData } from './meta';
 
@@ -17,10 +15,6 @@ export type CardProps = {
    * The card cover.
    */
   cover?: Image;
-  /**
-   * The cover fit. Default: cover.
-   */
-  coverFit?: ResponsiveImageProps['objectFit'];
   /**
    * The card id.
    */
@@ -55,7 +49,6 @@ export type CardProps = {
 const Card: FC<CardProps> = ({
   className = '',
   cover,
-  coverFit = 'cover',
   id,
   meta,
   tagline,
@@ -71,13 +64,7 @@ const Card: FC<CardProps> = ({
     >
       <article className={styles.article}>
         <header className={styles.header}>
-          {cover && (
-            <ResponsiveImage
-              {...cover}
-              objectFit={coverFit}
-              className={styles.cover}
-            />
-          )}
+          {cover && <ResponsiveImage {...cover} className={styles.cover} />}
           <Heading
             alignment="center"
             className={styles.title}
@@ -87,7 +74,7 @@ const Card: FC<CardProps> = ({
             {title}
           </Heading>
         </header>
-        <div className={styles.tagline}>{tagline}</div>
+        {tagline && <div className={styles.tagline}>{tagline}</div>}
         {meta && (
           <footer className={styles.footer}>
             <Meta
-- 
cgit v1.2.3

