aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src/components/displays/DancearoundScoreDisplay.tsx
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-11-08 21:29:49 -0800
committerPinapelz <yukais@pinapelz.com>2025-11-08 21:29:49 -0800
commit6649c6d950ee4216773d55f71b7e28eaef715ef5 (patch)
tree5cef444a75168b2bae2188565a80b3e4c4b58a64 /frontend/src/components/displays/DancearoundScoreDisplay.tsx
parent69e11de80c00a12d2c35d55ddfffa40550713442 (diff)
fix: show N/A for generic date data
Diffstat (limited to 'frontend/src/components/displays/DancearoundScoreDisplay.tsx')
-rw-r--r--frontend/src/components/displays/DancearoundScoreDisplay.tsx24
1 files changed, 14 insertions, 10 deletions
diff --git a/frontend/src/components/displays/DancearoundScoreDisplay.tsx b/frontend/src/components/displays/DancearoundScoreDisplay.tsx
index 973e96c..4b365dd 100644
--- a/frontend/src/components/displays/DancearoundScoreDisplay.tsx
+++ b/frontend/src/components/displays/DancearoundScoreDisplay.tsx
@@ -324,16 +324,20 @@ const DancearoundScoreDisplay: React.FC<ScoreDisplayProps> = ({
{/* Timestamp */}
<div className="pt-4 border-t border-slate-800/50">
<p className="text-slate-500 text-xs">
- {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",
+ })}
+ </>
+ )}
</p>
</div>
</div>
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage