From bfee71f44620e4d66e338f0f7e86303a811916c1 Mon Sep 17 00:00:00 2001 From: Honkertonken <94032937+Honkertonken@users.noreply.github.com> Date: Thu, 28 Mar 2024 16:47:18 +0530 Subject: [PATCH] Update MediaCard.tsx --- src/components/media/MediaCard.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/media/MediaCard.tsx b/src/components/media/MediaCard.tsx index 937ff1c6..563e4d9b 100644 --- a/src/components/media/MediaCard.tsx +++ b/src/components/media/MediaCard.tsx @@ -37,10 +37,12 @@ function MediaCardContent({ const currentYear = new Date().getFullYear(); const canLink = - linkable && !closable && media.year && media.year < currentYear; + linkable && !closable && media.year && media.year <= currentYear; const dotListContent = [t(`media.types.${media.type}`)]; - if (media.year && media.year < currentYear) { + if (media.year && media.year > currentYear) { + dotListContent.push(`${media.year}`, t("media.unreleased")); + } else if (media.year) { dotListContent.push(media.year.toFixed()); } else { dotListContent.push(t("media.unreleased")); @@ -153,7 +155,7 @@ export function MediaCard(props: MediaCardProps) { props.linkable && !props.closable && props.media.year && - props.media.year < currentYear; + props.media.year <= currentYear; let link = canLink ? `/media/${encodeURIComponent(mediaItemToId(props.media))}`