diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-11-08 21:29:49 -0800 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-11-08 21:29:49 -0800 |
| commit | 6649c6d950ee4216773d55f71b7e28eaef715ef5 (patch) | |
| tree | 5cef444a75168b2bae2188565a80b3e4c4b58a64 /frontend/src/components/displays/DancerushScoreDisplay.tsx | |
| parent | 69e11de80c00a12d2c35d55ddfffa40550713442 (diff) | |
fix: show N/A for generic date data
Diffstat (limited to 'frontend/src/components/displays/DancerushScoreDisplay.tsx')
| -rw-r--r-- | frontend/src/components/displays/DancerushScoreDisplay.tsx | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/frontend/src/components/displays/DancerushScoreDisplay.tsx b/frontend/src/components/displays/DancerushScoreDisplay.tsx index 201087e..85bdae8 100644 --- a/frontend/src/components/displays/DancerushScoreDisplay.tsx +++ b/frontend/src/components/displays/DancerushScoreDisplay.tsx @@ -318,16 +318,20 @@ const DancerushScoreDisplay: 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> |
