diff --git a/src/components/player/Score.tsx b/src/components/player/Score.tsx index 5a82f9c..ae525e9 100644 --- a/src/components/player/Score.tsx +++ b/src/components/player/Score.tsx @@ -25,9 +25,15 @@ type ScoreProps = { score: ScoresaberScore; player: ScoresaberPlayer; leaderboard: ScoresaberLeaderboardInfo; + ownProfile?: ScoresaberPlayer; }; -export default function Score({ score, player, leaderboard }: ScoreProps) { +export default function Score({ + score, + player, + leaderboard, + ownProfile, +}: ScoreProps) { const isFullCombo = score.missedNotes + score.badCuts === 0; const diffName = scoresaberDifficultyNumberToName( leaderboard.difficulty.difficulty, @@ -37,6 +43,7 @@ export default function Score({ score, player, leaderboard }: ScoreProps) { const totalMissedNotes = score.missedNotes + score.badCuts; const weightedPp = formatNumber(getPpGainedFromScore(player.id, score), 2) + "pp"; + const isOwnProfile = player.id === ownProfile?.id; return (
Performance Points
-Weighted PP: {weightedPp}
+ {weightedPp &&Weighted PP: {weightedPp}
} +Raw PP: {formatNumber(score.pp, 2)}pp
Mistakes
-Misses: {score.missedNotes}
-Bad Cuts: {score.badCuts}
+ {isFullCombo ? ( +Full Combo
+ ) : ( + <> +Misses: {score.missedNotes}
+Bad Cuts: {score.badCuts}
+ > + )}