From 5d77b1fc2487d739f2eea15c30aa66b0b5dd192e Mon Sep 17 00:00:00 2001 From: Timothy Lin Date: Mon, 27 Dec 2021 15:04:38 +0800 Subject: [PATCH] fix: allow proj img to be optional --- components/Card.js | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/components/Card.js b/components/Card.js index 5e5d2d1..61e296a 100644 --- a/components/Card.js +++ b/components/Card.js @@ -3,9 +3,23 @@ import Link from './Link' const Card = ({ title, description, imgSrc, href }) => (
-
- {href ? ( - +
+ {imgSrc && + (href ? ( + + {title} + + ) : ( {title} ( width={544} height={306} /> - - ) : ( - {title} - )} + ))}

{href ? (