Updated cc stats

This commit is contained in:
2025-09-08 15:19:53 +02:00
parent 0183ea1b16
commit 5781880be4
3 changed files with 54 additions and 1 deletions

View File

@@ -6,11 +6,13 @@ import { getScoreColor } from "@/lib/hypixel/copsandcrims/general"
import { devide } from "@/lib/hypixel/general"
import { NonNullStats } from "@/lib/schema/player"
import CollapsedStats from "../../_components/CollapsedStats"
import CopsAndCrimsGeneralStats from "./stats"
export default function CopsAndCrimsStats({ stats }: { stats: NonNullStats["CopsAndCrims"] }) {
if (!stats) return null
const kills = stats.kills + stats.kills_deathmatch + stats.kills_gungame
const assists = stats.assists + stats.assists_deathmatch + stats.assists_gungame
const deaths = stats.deaths + stats.deaths_deathmatch + stats.deaths_gungame
const wins = stats.game_wins + stats.game_wins_deathmatch + stats.game_wins_gungame
const kd = formatNumber(devide(kills, deaths))
@@ -48,6 +50,8 @@ export default function CopsAndCrimsStats({ stats }: { stats: NonNullStats["Cops
</AccordionTrigger>
<AccordionContent>
<Separator className="my-4" />
<CopsAndCrimsGeneralStats stats={stats} wins={wins} kills={kills} assits={assists} deaths={deaths} />
<Separator className="my-4" />
</AccordionContent>
</CardContent>
</Card>