29 lines
1.4 KiB
TypeScript
29 lines
1.4 KiB
TypeScript
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>
|
|
)
|
|
}
|