diff --git a/projects/website/src/components/score/score.tsx b/projects/website/src/components/score/score.tsx index fa13631..57d7f73 100644 --- a/projects/website/src/components/score/score.tsx +++ b/projects/website/src/components/score/score.tsx @@ -37,12 +37,18 @@ export default function Score({ player, playerScore }: Props) { setBeatSaverMap(beatSaverMapData); }, [leaderboard.songHash]); + useEffect(() => { + if (playerScore?.score?.baseScore) { + setBaseScore(playerScore.score.baseScore); + } + }, [playerScore]); + useEffect(() => { fetchBeatSaverData(); }, [fetchBeatSaverData]); const accuracy = (baseScore / leaderboard.maxScore) * 100; - const pp = scoresaberService.getPp(leaderboard.stars, accuracy); + const pp = baseScore == score.baseScore ? score.pp : scoresaberService.getPp(leaderboard.stars, accuracy); return (