From 0d12e7c02452e1a199b04b64e5e8a7b1250ef6d0 Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 23 Oct 2024 16:41:31 +0100 Subject: [PATCH] fix score feed acc --- .../website/src/components/score/badges/score-accuracy.tsx | 3 ++- .../website/src/components/score/score-feed/score-feed.tsx | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/projects/website/src/components/score/badges/score-accuracy.tsx b/projects/website/src/components/score/badges/score-accuracy.tsx index 8ba2707..20ddcc5 100644 --- a/projects/website/src/components/score/badges/score-accuracy.tsx +++ b/projects/website/src/components/score/badges/score-accuracy.tsx @@ -53,7 +53,8 @@ export function ScoreAccuracyBadge({ score, leaderboard }: ScoreAccuracyProps) { } >

- {score.accuracy.toFixed(2)}% {modCount > 0 && } + {score.accuracy == Infinity ? "∞" : score.accuracy.toFixed(2)}%{" "} + {modCount > 0 && }

{scoreImprovement && previousAccuracy && ( diff --git a/projects/website/src/components/score/score-feed/score-feed.tsx b/projects/website/src/components/score/score-feed/score-feed.tsx index e56e76a..d735168 100644 --- a/projects/website/src/components/score/score-feed/score-feed.tsx +++ b/projects/website/src/components/score/score-feed/score-feed.tsx @@ -42,6 +42,8 @@ export default function ScoreFeed() {
{scores.map(score => { const player = score.score.leaderboardPlayerInfo; + const leaderboard = getScoreSaberLeaderboardFromToken(score.leaderboard); + return (

@@ -51,8 +53,8 @@ export default function ScoreFeed() {