feat(overlay): add leaderboard toggle for BL and SS
All checks were successful
deploy / deploy (push) Successful in 58s
All checks were successful
deploy / deploy (push) Successful in 58s
This commit is contained in:
@ -1,14 +1,20 @@
|
||||
import { ScoresaberPlayer } from "@/schemas/scoresaber/player";
|
||||
import { OverlayPlayer } from "@/overlay/type/overlayPlayer";
|
||||
import { formatNumber } from "@/utils/numberUtils";
|
||||
import { GlobeAltIcon } from "@heroicons/react/20/solid";
|
||||
import Image from "next/image";
|
||||
import CountyFlag from "../CountryFlag";
|
||||
|
||||
type PlayerStatsProps = {
|
||||
player: ScoresaberPlayer;
|
||||
player: OverlayPlayer;
|
||||
settings: any;
|
||||
};
|
||||
|
||||
export default function PlayerStats({ player }: PlayerStatsProps) {
|
||||
const leaderboardImages: Record<string, string> = {
|
||||
scoresaber: "/assets/logos/scoresaber.png",
|
||||
beatleader: "/assets/logos/beatleader.png",
|
||||
};
|
||||
|
||||
export default function PlayerStats({ player, settings }: PlayerStatsProps) {
|
||||
return (
|
||||
<div className="flex gap-2 p-2">
|
||||
<Image
|
||||
@ -19,7 +25,15 @@ export default function PlayerStats({ player }: PlayerStatsProps) {
|
||||
height={180}
|
||||
/>
|
||||
<div>
|
||||
<p className="text-3xl font-bold">{formatNumber(player.pp, 2)}pp</p>
|
||||
<div className="flex gap-2">
|
||||
<Image
|
||||
alt="Leaderboard logo"
|
||||
src={leaderboardImages[settings.platform]}
|
||||
width={36}
|
||||
height={36}
|
||||
/>
|
||||
<p className="text-3xl font-bold">{formatNumber(player.pp, 2)}pp</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<GlobeAltIcon width={25} height={25} />
|
||||
<p className="text-3xl">#{formatNumber(player.rank)}</p>
|
||||
|
Reference in New Issue
Block a user