diff --git a/projects/website/src/components/leaderboard/leaderboard-score.tsx b/projects/website/src/components/leaderboard/leaderboard-score.tsx index ad37a11..241a173 100644 --- a/projects/website/src/components/leaderboard/leaderboard-score.tsx +++ b/projects/website/src/components/leaderboard/leaderboard-score.tsx @@ -26,7 +26,7 @@ export default function LeaderboardScore({ score, claimedPlayer }: Props) { {/* Player */} - + {/* Time Set */} diff --git a/projects/website/src/components/player/player-info.tsx b/projects/website/src/components/player/player-info.tsx index 79a1de0..0422b73 100644 --- a/projects/website/src/components/player/player-info.tsx +++ b/projects/website/src/components/player/player-info.tsx @@ -4,6 +4,7 @@ import Link from "next/link"; import ScoreSaberPlayerToken from "@ssr/common/types/token/scoresaber/score-saber-player-token"; import ScoreSaberLeaderboardPlayerInfoToken from "@ssr/common/types/token/scoresaber/score-saber-leaderboard-player-info-token"; import { getScoreSaberRole } from "@ssr/common/scoresaber.util"; +import ScoreSaberPlayer from "@ssr/common/player/impl/scoresaber-player"; type TablePlayerProps = { /** @@ -12,9 +13,9 @@ type TablePlayerProps = { player: ScoreSaberPlayerToken | ScoreSaberLeaderboardPlayerInfoToken; /** - * The claimed player. + * The player to highlight. */ - claimedPlayer?: ScoreSaberPlayerToken; + highlightedPlayer?: ScoreSaberPlayerToken | ScoreSaberPlayer; /** * Hide the country flag @@ -22,7 +23,7 @@ type TablePlayerProps = { hideCountryFlag?: boolean; }; -export function PlayerInfo({ player, claimedPlayer, hideCountryFlag }: TablePlayerProps) { +export function PlayerInfo({ player, highlightedPlayer, hideCountryFlag }: TablePlayerProps) { return ( <> @@ -34,7 +35,7 @@ export function PlayerInfo({ player, claimedPlayer, hideCountryFlag }: TablePlay {!hideCountryFlag && }

, + icon: () => , }, Country: { icon: (player: ScoreSaberPlayer) => { @@ -79,12 +79,12 @@ export default function Mini({ type, player, shouldUpdate }: MiniProps) { } return ( - +

{icon}

{type} Ranking

-
+
{response.players.map((playerRanking, index) => { const rank = type == "Global" ? playerRanking.rank : playerRanking.countryRank; const playerName = @@ -101,7 +101,7 @@ export default function Mini({ type, player, shouldUpdate }: MiniProps) { >

#{formatNumberWithCommas(rank)}

- +

{formatPp(playerRanking.pp)}pp

diff --git a/projects/website/src/components/ranking/player-ranking.tsx b/projects/website/src/components/ranking/player-ranking.tsx index cd12a25..426c9e2 100644 --- a/projects/website/src/components/ranking/player-ranking.tsx +++ b/projects/website/src/components/ranking/player-ranking.tsx @@ -26,7 +26,7 @@ export function PlayerRanking({ player, isCountry }: PlayerRankingProps) { {isCountry && "(#" + formatNumberWithCommas(player.rank) + ")"} - + {formatPp(player.pp)}pp {formatNumberWithCommas(player.scoreStats.totalPlayCount)}