Quick change
This commit is contained in:
@@ -1,9 +1,52 @@
|
||||
"use client"
|
||||
|
||||
import { Accordion } from "@/components/ui/accordion"
|
||||
import { usePathname } from "next/navigation"
|
||||
|
||||
import { Player } from "@/lib/schema/player"
|
||||
import ArcadeStats from "./_stats/arcade/arcade"
|
||||
import BedwarsStats from "./_stats/bedwars/bedwars"
|
||||
import BlitzStats from "./_stats/blitz/blitz"
|
||||
import BuildBattleStats from "./_stats/build-battle/build-battle"
|
||||
import CopsAndCrimsStats from "./_stats/copsandcrims/copsandcrims"
|
||||
import DuelsStats from "./_stats/duels/duels"
|
||||
import MegaWallsStats from "./_stats/megawalls/megawalls"
|
||||
import MurderMysteryStats from "./_stats/murder-mystery/murder-mystery"
|
||||
import PitStats from "./_stats/pit/pit"
|
||||
import SkyWarsStats from "./_stats/skywars/skywars"
|
||||
import TNTGamesStats from "./_stats/tnt-games/tnt-games"
|
||||
import UHCStats from "./_stats/uhc/uhc"
|
||||
import WoolGamesStats from "./_stats/woolgames/woolgames"
|
||||
|
||||
export function PlayerPageLoadText() {
|
||||
const path = usePathname()
|
||||
|
||||
return <p>{`Loading stats for ${path.split("/").at(-1)}`}</p>
|
||||
}
|
||||
|
||||
export default function PlayerStats(
|
||||
{ stats, achievements }: { stats: NonNullable<Player["player"]["stats"]>, achievements: Player["player"]["achievements"] }
|
||||
) {
|
||||
return (
|
||||
<div className="w-full md:w-3/4">
|
||||
<Accordion type="multiple" className="space-y-4">
|
||||
<BedwarsStats stats={stats.Bedwars} />
|
||||
<SkyWarsStats
|
||||
stats={stats.SkyWars}
|
||||
achievements_skywars_opal_obsession={achievements?.["skywars_opal_obsession"] ?? 0}
|
||||
/>
|
||||
<DuelsStats stats={stats.Duels} />
|
||||
<MurderMysteryStats stats={stats.MurderMystery} />
|
||||
<BuildBattleStats stats={stats.BuildBattle} />
|
||||
<UHCStats stats={stats.UHC} />
|
||||
<PitStats stats={stats.Pit} />
|
||||
<TNTGamesStats stats={stats.TNTGames} />
|
||||
<MegaWallsStats stats={stats.MegaWalls} />
|
||||
<CopsAndCrimsStats stats={stats.CopsAndCrims} />
|
||||
<WoolGamesStats stats={stats.WoolGames} />
|
||||
<BlitzStats stats={stats.Blitz} />
|
||||
<ArcadeStats stats={stats.Arcade} />
|
||||
</Accordion>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user