From d22c0a0066f11c4a9159d1caf2279f41114b8f59 Mon Sep 17 00:00:00 2001 From: Maksim Korinets Date: Tue, 26 Mar 2024 10:05:16 +0700 Subject: [PATCH] Fix href handling @ Card --- src/components/Card.jsx | 4 +++- src/components/Cards/GitHub.jsx | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Card.jsx b/src/components/Card.jsx index 3ab704c..20c88d0 100644 --- a/src/components/Card.jsx +++ b/src/components/Card.jsx @@ -4,7 +4,9 @@ import useFetchData from '../hooks/useFetchData'; export default function Card({ href, thumb, major, minor, content, isLoading }) { - return
window.location = href }> + const clickable = Boolean(href); // for later use in tailwind classes + + return
window.location = href : ()=>{} }> { isLoading &&

Loading...

} diff --git a/src/components/Cards/GitHub.jsx b/src/components/Cards/GitHub.jsx index d1f6a2f..c72ba80 100644 --- a/src/components/Cards/GitHub.jsx +++ b/src/components/Cards/GitHub.jsx @@ -6,7 +6,7 @@ export default function GitHub() { const { yentsun, lastEvent } = useGithub(); - return