Updated cc stats
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user