From e431626bfa767b5c8c1e2b328a39171b1c9d912b Mon Sep 17 00:00:00 2001 From: Honkertonken <94032937+Honkertonken@users.noreply.github.com> Date: Wed, 27 Mar 2024 23:19:12 +0530 Subject: [PATCH] Update MediaCard.tsx --- src/components/media/MediaCard.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/media/MediaCard.tsx b/src/components/media/MediaCard.tsx index cad3ae6a..ac6c243c 100644 --- a/src/components/media/MediaCard.tsx +++ b/src/components/media/MediaCard.tsx @@ -35,10 +35,14 @@ function MediaCardContent({ const { t } = useTranslation(); const percentageString = `${Math.round(percentage ?? 0).toFixed(0)}%`; - const canLink = linkable && !closable; + const canLink = linkable && !closable && !!media.year; const dotListContent = [t(`media.types.${media.type}`)]; - if (media.year) dotListContent.push(media.year.toFixed()); + if (media.year) { + dotListContent.push(media.year.toFixed()); + } else { + dotListContent.push(t("Unreleased")); + } return (
{content}; + if (!props.linkable || !props.media.year) return {content}; return (