From cd2f8c0925d0c7192b6d5ce9eef7ad3ca07be970 Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 20 Oct 2024 19:25:32 +0100 Subject: [PATCH] pass through the leaderboard --- .../src/components/leaderboard/leaderboard-score.tsx | 12 ++++++++++-- .../components/leaderboard/leaderboard-scores.tsx | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/projects/website/src/components/leaderboard/leaderboard-score.tsx b/projects/website/src/components/leaderboard/leaderboard-score.tsx index 2d538a1..e3e0577 100644 --- a/projects/website/src/components/leaderboard/leaderboard-score.tsx +++ b/projects/website/src/components/leaderboard/leaderboard-score.tsx @@ -6,6 +6,7 @@ import { clsx } from "clsx"; import Tooltip from "@/components/tooltip"; import { ScoreTimeSet } from "@/components/score/score-time-set"; import { ScoreModifiers } from "@/components/score/score-modifiers"; +import ScoreSaberLeaderboard from "@ssr/common/leaderboard/impl/scoresaber-leaderboard"; type Props = { /** @@ -13,13 +14,18 @@ type Props = { */ score: ScoreSaberScore; + /** + * The leaderboard for the score. + */ + leaderboard: ScoreSaberLeaderboard; + /** * The claimed player. */ claimedPlayer?: ScoreSaberPlayerToken; }; -export default function LeaderboardScore({ score, claimedPlayer }: Props) { +export default function LeaderboardScore({ score, leaderboard, claimedPlayer }: Props) { const scorePlayer = score.playerInfo; return ( @@ -54,7 +60,9 @@ export default function LeaderboardScore({ score, claimedPlayer }: Props) { {/* Score PP */} - {score.pp > 0 && {formatPp(score.pp)}pp} + {leaderboard.stars > 0 && ( + {formatPp(score.pp)}pp + )} {/* Score Modifiers */} diff --git a/projects/website/src/components/leaderboard/leaderboard-scores.tsx b/projects/website/src/components/leaderboard/leaderboard-scores.tsx index 1a8e12e..6b3a0c1 100644 --- a/projects/website/src/components/leaderboard/leaderboard-scores.tsx +++ b/projects/website/src/components/leaderboard/leaderboard-scores.tsx @@ -186,7 +186,7 @@ export default function LeaderboardScores({ {currentScores.scores.map((playerScore, index) => ( - + ))}