Added smash heros general stats
This commit is contained in:
28
src/app/(stats)/player/[ign]/_stats/smashheros/stats.tsx
Normal file
28
src/app/(stats)/player/[ign]/_stats/smashheros/stats.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user