import { Avatar, AvatarImage } from "@/components/ui/avatar"; import CountryFlag from "@/components/country-flag"; 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 = { /** * The player to display. */ player: ScoreSaberPlayerToken | ScoreSaberLeaderboardPlayerInfoToken; /** * The player to highlight. */ highlightedPlayer?: ScoreSaberPlayerToken | ScoreSaberPlayer; /** * Hide the country flag */ hideCountryFlag?: boolean; }; export function PlayerInfo({ player, highlightedPlayer, hideCountryFlag }: TablePlayerProps) { return ( <> {!hideCountryFlag && }

{player.name}

); }