fix score feed acc
All checks were successful
Deploy Website / docker (ubuntu-latest) (push) Successful in 2m24s

This commit is contained in:
Lee 2024-10-23 16:41:31 +01:00
parent e403d1f241
commit 0d12e7c024
2 changed files with 6 additions and 3 deletions

@ -53,7 +53,8 @@ export function ScoreAccuracyBadge({ score, leaderboard }: ScoreAccuracyProps) {
} }
> >
<p> <p>
{score.accuracy.toFixed(2)}% {modCount > 0 && <ScoreModifiers type="simple" limit={1} score={score} />} {score.accuracy == Infinity ? "∞" : score.accuracy.toFixed(2)}%{" "}
{modCount > 0 && <ScoreModifiers type="simple" limit={1} score={score} />}
</p> </p>
</Tooltip> </Tooltip>
{scoreImprovement && previousAccuracy && ( {scoreImprovement && previousAccuracy && (

@ -42,6 +42,8 @@ export default function ScoreFeed() {
<div className="flex flex-col divide-y divide-border"> <div className="flex flex-col divide-y divide-border">
{scores.map(score => { {scores.map(score => {
const player = score.score.leaderboardPlayerInfo; const player = score.score.leaderboardPlayerInfo;
const leaderboard = getScoreSaberLeaderboardFromToken(score.leaderboard);
return ( return (
<div key={score.score.id} className="flex flex-col py-2"> <div key={score.score.id} className="flex flex-col py-2">
<p className="text-sm"> <p className="text-sm">
@ -51,8 +53,8 @@ export default function ScoreFeed() {
</Link> </Link>
</p> </p>
<Score <Score
score={getScoreSaberScoreFromToken(score.score)} score={getScoreSaberScoreFromToken(score.score, leaderboard)}
leaderboard={getScoreSaberLeaderboardFromToken(score.leaderboard)} leaderboard={leaderboard}
settings={{ settings={{
noScoreButtons: true, noScoreButtons: true,
}} }}