dont show country flags on country ranking page
All checks were successful
deploy / deploy (push) Successful in 57s
All checks were successful
deploy / deploy (push) Successful in 57s
This commit is contained in:
parent
e71ffbdd95
commit
7e3e4a7d18
@ -20,11 +20,11 @@ type PageInfo = {
|
|||||||
players: ScoresaberPlayer[];
|
players: ScoresaberPlayer[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function RankingCountry({
|
type RankingCountryProps = {
|
||||||
params,
|
|
||||||
}: {
|
|
||||||
params: { country: string };
|
params: { country: string };
|
||||||
}) {
|
};
|
||||||
|
|
||||||
|
export default function RankingCountry({ params }: RankingCountryProps) {
|
||||||
const searchParams = useSearchParams();
|
const searchParams = useSearchParams();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ export default function RankingCountry({
|
|||||||
<tbody className="border-none">
|
<tbody className="border-none">
|
||||||
{players.map((player) => (
|
{players.map((player) => (
|
||||||
<tr key={player.rank} className="border-b border-gray-700">
|
<tr key={player.rank} className="border-b border-gray-700">
|
||||||
<PlayerRanking player={player} />
|
<PlayerRanking showCountryFlag={false} player={player} />
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -8,9 +8,13 @@ import Avatar from "../Avatar";
|
|||||||
|
|
||||||
type PlayerRankingProps = {
|
type PlayerRankingProps = {
|
||||||
player: ScoresaberPlayer;
|
player: ScoresaberPlayer;
|
||||||
|
showCountryFlag?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function PlayerRanking({ player }: PlayerRankingProps) {
|
export default function PlayerRanking({
|
||||||
|
player,
|
||||||
|
showCountryFlag,
|
||||||
|
}: PlayerRankingProps) {
|
||||||
const settingsStore = useStore(useSettingsStore, (store) => store);
|
const settingsStore = useStore(useSettingsStore, (store) => store);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -18,11 +22,13 @@ export default function PlayerRanking({ player }: PlayerRankingProps) {
|
|||||||
<td className="px-4 py-2">#{formatNumber(player.rank)}</td>
|
<td className="px-4 py-2">#{formatNumber(player.rank)}</td>
|
||||||
<td className="flex items-center gap-2 px-4 py-2">
|
<td className="flex items-center gap-2 px-4 py-2">
|
||||||
<Avatar url={player.profilePicture} label="Avatar" size={24} />
|
<Avatar url={player.profilePicture} label="Avatar" size={24} />
|
||||||
<ReactCountryFlag
|
{showCountryFlag && (
|
||||||
countryCode={player.country}
|
<ReactCountryFlag
|
||||||
svg
|
countryCode={player.country}
|
||||||
className="!h-5 !w-5"
|
svg
|
||||||
/>
|
className="!h-5 !w-5"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<Link
|
<Link
|
||||||
className="transform-gpu transition-all hover:text-blue-500"
|
className="transform-gpu transition-all hover:text-blue-500"
|
||||||
href={"/player/" + player.id}
|
href={"/player/" + player.id}
|
||||||
|
Loading…
Reference in New Issue
Block a user