From 8f617aca82dff945cfd0456011b42b51da9d64cf Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 19 Oct 2024 17:48:29 +0100 Subject: [PATCH] fix mini hover on player --- .../website/src/components/player/player-info.tsx | 13 +++++++++++-- projects/website/src/components/ranking/mini.tsx | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/projects/website/src/components/player/player-info.tsx b/projects/website/src/components/player/player-info.tsx index 44f7df3..1b5dc77 100644 --- a/projects/website/src/components/player/player-info.tsx +++ b/projects/website/src/components/player/player-info.tsx @@ -5,6 +5,7 @@ import ScoreSaberPlayerToken from "@ssr/common/types/token/scoresaber/score-sabe 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"; +import { clsx } from "clsx"; type TablePlayerProps = { /** @@ -21,9 +22,14 @@ type TablePlayerProps = { * Hide the country flag */ hideCountryFlag?: boolean; + + /** + * Whether to apply hover brightness + */ + hoverBrightness?: boolean; }; -export function PlayerInfo({ player, highlightedPlayer, hideCountryFlag }: TablePlayerProps) { +export function PlayerInfo({ player, highlightedPlayer, hideCountryFlag, hoverBrightness = true }: TablePlayerProps) { return (
@@ -33,7 +39,10 @@ export function PlayerInfo({ player, highlightedPlayer, hideCountryFlag }: Table /> {!hideCountryFlag && } - +

#{formatNumberWithCommas(rank)}

- +

{formatPp(playerRanking.pp)}pp