aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src/components/displays/GenericScoreDisplay.tsx
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-11-08 21:19:35 -0800
committerPinapelz <yukais@pinapelz.com>2025-11-08 21:19:35 -0800
commite967cc93ac85a07082da67211513815ec7f2eab3 (patch)
treeb90873c4edac9fc90fb958b4860cd6d77c0d35e0 /frontend/src/components/displays/GenericScoreDisplay.tsx
parentcdb7a1f9a6caab87ebfe69f1e8486fb229c558b5 (diff)
allow for timestamp = 0 to represent unknown date which a score was
achieved
Diffstat (limited to 'frontend/src/components/displays/GenericScoreDisplay.tsx')
-rw-r--r--frontend/src/components/displays/GenericScoreDisplay.tsx2
1 files changed, 2 insertions, 0 deletions
diff --git a/frontend/src/components/displays/GenericScoreDisplay.tsx b/frontend/src/components/displays/GenericScoreDisplay.tsx
index defeb82..a52b157 100644
--- a/frontend/src/components/displays/GenericScoreDisplay.tsx
+++ b/frontend/src/components/displays/GenericScoreDisplay.tsx
@@ -66,6 +66,8 @@ const ScoreDisplay: React.FC<ScoreDisplayProps> = ({
// Handle timestamps
if (key === "timestamp" || key === "date") {
+ if(value === 0)
+ return "N/A";
const date = new Date(typeof value === "number" ? value : value);
return date.toLocaleDateString();
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage