added wool games stats card
This commit is contained in:
27
src/app/(stats)/player/[ign]/_stats/woolgames/woolgames.tsx
Normal file
27
src/app/(stats)/player/[ign]/_stats/woolgames/woolgames.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import { AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion"
|
||||
import { Card, CardContent } from "@/components/ui/card"
|
||||
import { Separator } from "@/components/ui/separator"
|
||||
import { NonNullStats } from "@/lib/schema/player"
|
||||
import CollapsedStats from "../../_components/CollapsedStats"
|
||||
|
||||
export default function WoolGamesStats({ stats }: { stats: NonNullStats["WoolGames"] }) {
|
||||
if (!stats) return null
|
||||
|
||||
return (
|
||||
<AccordionItem value="woolgames">
|
||||
<Card className="py-0">
|
||||
<CardContent>
|
||||
<AccordionTrigger className="items-center py-2 hover:no-underline hover:cursor-pointer">
|
||||
<h1 className="text-xl font-bold">Wool Games</h1>
|
||||
<div className="flex gap-4">
|
||||
<CollapsedStats stats={[]} />
|
||||
</div>
|
||||
</AccordionTrigger>
|
||||
<AccordionContent>
|
||||
<Separator className="my-4" />
|
||||
</AccordionContent>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</AccordionItem>
|
||||
)
|
||||
}
|
||||
@@ -21,6 +21,7 @@ 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 async function generateMetadata({ params }: { params: Promise<{ ign: string }> }): Promise<Metadata> {
|
||||
const { ign } = await params
|
||||
@@ -125,6 +126,7 @@ async function SuspendedPage({ params }: Pick<PageProps<"/player/[ign]">, "param
|
||||
<TNTGamesStats stats={player.stats.TNTGames} />
|
||||
<MegaWallsStats stats={player.stats.MegaWalls} />
|
||||
<CopsAndCrimsStats stats={player.stats.CopsAndCrims} />
|
||||
<WoolGamesStats stats={player.stats.WoolGames} />
|
||||
</Accordion>
|
||||
</div>
|
||||
) :
|
||||
|
||||
Reference in New Issue
Block a user