From 6649c6d950ee4216773d55f71b7e28eaef715ef5 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Sat, 8 Nov 2025 21:29:49 -0800 Subject: fix: show N/A for generic date data --- .../src/components/displays/TaikoScoreDisplay.tsx | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'frontend/src/components/displays/TaikoScoreDisplay.tsx') diff --git a/frontend/src/components/displays/TaikoScoreDisplay.tsx b/frontend/src/components/displays/TaikoScoreDisplay.tsx index 3c6ea01..d67847a 100644 --- a/frontend/src/components/displays/TaikoScoreDisplay.tsx +++ b/frontend/src/components/displays/TaikoScoreDisplay.tsx @@ -416,16 +416,20 @@ const TaikoScoreDisplay: React.FC = ({ {/* Timestamp */}

- {new Date( - typeof timestamp === "number" ? timestamp : timestamp, - ).toLocaleDateString()}{" "} - •{" "} - {new Date( - typeof timestamp === "number" ? timestamp : timestamp, - ).toLocaleTimeString([], { - hour: "2-digit", - minute: "2-digit", - })} + {timestamp === 0 ? "N/A" : ( + <> + {new Date( + typeof timestamp === "number" ? timestamp : timestamp, + ).toLocaleDateString()}{" "} + •{" "} + {new Date( + typeof timestamp === "number" ? timestamp : timestamp, + ).toLocaleTimeString([], { + hour: "2-digit", + minute: "2-digit", + })} + + )}

-- cgit v1.2.3