aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src/components/displays/GenericScoreDisplay.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/displays/GenericScoreDisplay.tsx')
-rw-r--r--frontend/src/components/displays/GenericScoreDisplay.tsx24
1 files changed, 14 insertions, 10 deletions
diff --git a/frontend/src/components/displays/GenericScoreDisplay.tsx b/frontend/src/components/displays/GenericScoreDisplay.tsx
index a52b157..08d15ef 100644
--- a/frontend/src/components/displays/GenericScoreDisplay.tsx
+++ b/frontend/src/components/displays/GenericScoreDisplay.tsx
@@ -332,16 +332,20 @@ const ScoreDisplay: React.FC<ScoreDisplayProps> = ({
{/* Timestamp */}
<div className="pt-4 border-t border-slate-800/50">
<p className="text-slate-500 text-[10px] sm: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