diff options
8 files changed, 16 insertions, 0 deletions
diff --git a/frontend/src/components/displays/DancearoundScoreDisplay.tsx b/frontend/src/components/displays/DancearoundScoreDisplay.tsx index 6925dd0..973e96c 100644 --- a/frontend/src/components/displays/DancearoundScoreDisplay.tsx +++ b/frontend/src/components/displays/DancearoundScoreDisplay.tsx @@ -48,6 +48,8 @@ const DancearoundScoreDisplay: 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(); } diff --git a/frontend/src/components/displays/DancerushScoreDisplay.tsx b/frontend/src/components/displays/DancerushScoreDisplay.tsx index 2aaebf4..201087e 100644 --- a/frontend/src/components/displays/DancerushScoreDisplay.tsx +++ b/frontend/src/components/displays/DancerushScoreDisplay.tsx @@ -51,6 +51,8 @@ const DancerushScoreDisplay: 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(); } diff --git a/frontend/src/components/displays/DivaScoreDisplay.tsx b/frontend/src/components/displays/DivaScoreDisplay.tsx index a7b4824..a6c6dab 100644 --- a/frontend/src/components/displays/DivaScoreDisplay.tsx +++ b/frontend/src/components/displays/DivaScoreDisplay.tsx @@ -58,6 +58,8 @@ const DivaScoreDisplay: 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(); } 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(); } diff --git a/frontend/src/components/displays/MusicDiverScoreDisplay.tsx b/frontend/src/components/displays/MusicDiverScoreDisplay.tsx index 282268a..3d91412 100644 --- a/frontend/src/components/displays/MusicDiverScoreDisplay.tsx +++ b/frontend/src/components/displays/MusicDiverScoreDisplay.tsx @@ -53,6 +53,8 @@ const MusicDiverDisplay: 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(); } diff --git a/frontend/src/components/displays/NostalgiaScoreDisplay.tsx b/frontend/src/components/displays/NostalgiaScoreDisplay.tsx index 370aa8e..b64a059 100644 --- a/frontend/src/components/displays/NostalgiaScoreDisplay.tsx +++ b/frontend/src/components/displays/NostalgiaScoreDisplay.tsx @@ -57,6 +57,8 @@ const NostalgiaScoreDisplay: 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(); } diff --git a/frontend/src/components/displays/ReflecBeatScoreDisplay.tsx b/frontend/src/components/displays/ReflecBeatScoreDisplay.tsx index 63aa2a9..27260e8 100644 --- a/frontend/src/components/displays/ReflecBeatScoreDisplay.tsx +++ b/frontend/src/components/displays/ReflecBeatScoreDisplay.tsx @@ -50,6 +50,8 @@ const ReflecBeatScoreDisplay: 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(); } diff --git a/frontend/src/components/displays/TaikoScoreDisplay.tsx b/frontend/src/components/displays/TaikoScoreDisplay.tsx index ead13b3..3c6ea01 100644 --- a/frontend/src/components/displays/TaikoScoreDisplay.tsx +++ b/frontend/src/components/displays/TaikoScoreDisplay.tsx @@ -68,6 +68,8 @@ const TaikoScoreDisplay: 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(); } |
