From 9e73ff3937da03258524c0bd5df1b6eecc9546dd Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 27 Nov 2023 01:03:27 +0000 Subject: [PATCH] always show country flags in ranking pages --- src/components/GlobalRanking.tsx | 2 +- src/components/player/PlayerRanking.tsx | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/components/GlobalRanking.tsx b/src/components/GlobalRanking.tsx index c00c35c..a6ed41d 100644 --- a/src/components/GlobalRanking.tsx +++ b/src/components/GlobalRanking.tsx @@ -57,7 +57,7 @@ export default function GlobalRanking({ {players.map((player) => ( diff --git a/src/components/player/PlayerRanking.tsx b/src/components/player/PlayerRanking.tsx index e67dda9..ad92ea2 100644 --- a/src/components/player/PlayerRanking.tsx +++ b/src/components/player/PlayerRanking.tsx @@ -8,30 +8,26 @@ import CountyFlag from "../CountryFlag"; type PlayerRankingProps = { player: ScoresaberPlayer; - showCountryFlag?: boolean; + isCountry?: boolean; }; const Avatar = dynamic(() => import("@/components/Avatar")); export default function PlayerRanking({ player, - showCountryFlag, + isCountry, }: PlayerRankingProps) { const settingsStore = useStore(useSettingsStore, (store) => store); return ( <> - #{formatNumber(showCountryFlag ? player.countryRank : player.rank)}{" "} - - {showCountryFlag && "(#" + player.rank + ")"} - + #{formatNumber(isCountry ? player.countryRank : player.rank)}{" "} + {isCountry && "(#" + player.rank + ")"} - {showCountryFlag && ( - - )} +