Added smash heros general stats

This commit is contained in:
2025-09-18 10:29:34 +02:00
parent c6a4fe2a55
commit 7889c1850e
3 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
import { formatNumber } from "@/lib/formatters"
import { devide } from "@/lib/hypixel/general"
import { NonNullStats } from "@/lib/schema/player"
import { BasicStat } from "../../_components/Stats"
export default function SmashHerosGeneralStats({ stats }: { stats: NonNullable<NonNullStats["SmashHeros"]> }) {
const kd = formatNumber(devide(stats.kills, stats.deaths))
const wl = formatNumber(devide(stats.wins, stats.losses))
return (
<div className="flex">
<div className="flex-1">
<BasicStat title="Coins: " value={formatNumber(stats.coins)} className="text-mc-gold" />
<BasicStat title="Smash Level: " value={formatNumber(stats.smashLevel)} className="text-mc-aqua" />
<BasicStat title="Damage Dealt: " value={formatNumber(stats.damage_dealt)} />
</div>
<div className="flex-1">
<BasicStat title="Kills: " value={formatNumber(stats.kills)} />
<BasicStat title="Deaths: " value={formatNumber(stats.deaths)} />
<BasicStat title="Kill/Death Ratio: " value={kd} />
</div>
<div className="flex-1">
<BasicStat title="Wins: " value={formatNumber(stats.wins)} />
<BasicStat title="Losses: " value={formatNumber(stats.losses)} />
<BasicStat title="Win/Loss Ratio: " value={wl} />
</div>
</div>
)
}