From 8fa61a8eb28f3b0f62b5ce68a97c3fb4f4e6c54d Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Sun, 19 Jan 2025 20:01:01 +0300 Subject: feat/frontend: show 0 wr delta as dash (#256) --- frontend/src/pages/Profile.tsx | 4 ++-- frontend/src/pages/User.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/Profile.tsx b/frontend/src/pages/Profile.tsx index f7134a7..63b3c13 100644 --- a/frontend/src/pages/Profile.tsx +++ b/frontend/src/pages/Profile.tsx @@ -267,7 +267,7 @@ const Profile: React.FC = ({ profile, token, gameData, onDeleteRec {e.score_count} - {e.score_count - r.map_wr_count > 0 ? `+${e.score_count - r.map_wr_count}` : e.score_count - r.map_wr_count} + {e.score_count - r.map_wr_count > 0 ? `+${e.score_count - r.map_wr_count}` : `-`} {ticks_to_time(e.score_time)} {i === 0 ? #{r.placement} : } @@ -313,7 +313,7 @@ const Profile: React.FC = ({ profile, token, gameData, onDeleteRec {i !== 0 ?
: ""} {r.name} {record!.scores[i].score_count} - {record!.scores[i].score_count - record!.map_wr_count > 0 ? `+${record!.scores[i].score_count - record!.map_wr_count}` : record!.scores[i].score_count - record!.map_wr_count} + {record!.scores[i].score_count - record!.map_wr_count > 0 ? `+${record!.scores[i].score_count - record!.map_wr_count}` : `-`} {ticks_to_time(record!.scores[i].score_time)} {i === 0 ? #{record!.placement} : } diff --git a/frontend/src/pages/User.tsx b/frontend/src/pages/User.tsx index f90d1aa..938dbd5 100644 --- a/frontend/src/pages/User.tsx +++ b/frontend/src/pages/User.tsx @@ -236,7 +236,7 @@ const User: React.FC = ({ token, profile, gameData }) => { {e.score_count} - {e.score_count - r.map_wr_count > 0 ? `+${e.score_count - r.map_wr_count}` : e.score_count - r.map_wr_count} + {e.score_count - r.map_wr_count > 0 ? `+${e.score_count - r.map_wr_count}` : `-`} {ticks_to_time(e.score_time)} {i === 0 ? #{r.placement} : } @@ -281,7 +281,7 @@ const User: React.FC = ({ token, profile, gameData }) => { {i !== 0 ?
: ""} {r.name} {record!.scores[i].score_count} - {record!.scores[i].score_count - record!.map_wr_count > 0 ? `+${record!.scores[i].score_count - record!.map_wr_count}` : record!.scores[i].score_count - record!.map_wr_count} + {record!.scores[i].score_count - record!.map_wr_count > 0 ? `+${record!.scores[i].score_count - record!.map_wr_count}` : `-`} {ticks_to_time(record!.scores[i].score_time)} {i === 0 ? #{record!.placement} : } -- cgit v1.2.3