Fixed bedwars types

This commit is contained in:
2025-09-03 13:26:03 +02:00
parent ee44397e4c
commit 5019b80c1f
3 changed files with 5 additions and 7 deletions

View File

@@ -66,7 +66,7 @@ export default function BedwarsStats({ stats }: { stats: NonNullStats["Bedwars"]
<AccordionContent> <AccordionContent>
<Separator className="my-4" /> <Separator className="my-4" />
<BedwarsProgress level={level} percent={percent} currentXp={xpProgress} ceilingXp={ceilingXp} /> <BedwarsProgress level={level} percent={percent} currentXp={xpProgress} ceilingXp={ceilingXp} />
<BedwarsGeneralStats statsChecked={stats} level={level} percent={percent} bbl={bbl} kd={kd} fkd={fkd} wl={wl} /> <BedwarsGeneralStats stats={stats} level={level} percent={percent} bbl={bbl} kd={kd} fkd={fkd} wl={wl} />
<Separator className="my-4" /> <Separator className="my-4" />
<BedwarsStatTable stats={stats} /> <BedwarsStatTable stats={stats} />
</AccordionContent> </AccordionContent>

View File

@@ -5,8 +5,8 @@ import { BasicStat, Stat } from "../../_components/Stats"
import { BedWarsPrestige } from "./components" import { BedWarsPrestige } from "./components"
export default function BedwarsGeneralStats( export default function BedwarsGeneralStats(
{ statsChecked, level, percent, kd, fkd, bbl, wl }: { { stats, level, percent, kd, fkd, bbl, wl }: {
statsChecked: NonNullStats["Bedwars"] stats: NonNullable<NonNullStats["Bedwars"]>
level: number level: number
percent: number percent: number
kd: string kd: string
@@ -15,8 +15,6 @@ export default function BedwarsGeneralStats(
wl: string wl: string
} }
) { ) {
const stats = statsChecked!
return ( return (
<div className="flex mb-10"> <div className="flex mb-10">
<div className="flex-1"> <div className="flex-1">

View File

@@ -76,7 +76,7 @@ const ROWS: RowConfig[] = [
{ label: "All Modes", aggregateOf: SIMPLE_MODE_KEYS, bold: true } { label: "All Modes", aggregateOf: SIMPLE_MODE_KEYS, bold: true }
] ]
function StatRow({ cfg, stats }: { cfg: RowConfig, stats: NonNullStats["Bedwars"] }) { function StatRow({ cfg, stats }: { cfg: RowConfig, stats: NonNullable<NonNullStats["Bedwars"]> }) {
const bedwars = stats as _BedwarsStats const bedwars = stats as _BedwarsStats
let values: (number | string)[] = [] let values: (number | string)[] = []
@@ -103,7 +103,7 @@ function StatRow({ cfg, stats }: { cfg: RowConfig, stats: NonNullStats["Bedwars"
) )
} }
export default function BedwarsStatTable({ stats }: { stats: NonNullStats["Bedwars"] }) { export default function BedwarsStatTable({ stats }: { stats: NonNullable<NonNullStats["Bedwars"]> }) {
return ( return (
<Table> <Table>
<BedwarsTableHeader /> <BedwarsTableHeader />