fix "Infinity%" on % score
All checks were successful
deploy / deploy (push) Successful in 57s

This commit is contained in:
Lee 2023-10-20 19:47:26 +01:00
parent ae96719976
commit 1ce3a2a451

@ -249,7 +249,9 @@ export default function Player({ params }: { params: { id: string } }) {
)}
<ScoreStatLabel
value={
(
!leaderboard.maxScore
? formatNumber(score.baseScore)
: (
(score.baseScore / leaderboard.maxScore) *
100
).toFixed(2) + "%"