Fixed bedwars types
This commit is contained in:
@@ -66,7 +66,7 @@ export default function BedwarsStats({ stats }: { stats: NonNullStats["Bedwars"]
|
||||
<AccordionContent>
|
||||
<Separator className="my-4" />
|
||||
<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" />
|
||||
<BedwarsStatTable stats={stats} />
|
||||
</AccordionContent>
|
||||
|
||||
@@ -5,8 +5,8 @@ import { BasicStat, Stat } from "../../_components/Stats"
|
||||
import { BedWarsPrestige } from "./components"
|
||||
|
||||
export default function BedwarsGeneralStats(
|
||||
{ statsChecked, level, percent, kd, fkd, bbl, wl }: {
|
||||
statsChecked: NonNullStats["Bedwars"]
|
||||
{ stats, level, percent, kd, fkd, bbl, wl }: {
|
||||
stats: NonNullable<NonNullStats["Bedwars"]>
|
||||
level: number
|
||||
percent: number
|
||||
kd: string
|
||||
@@ -15,8 +15,6 @@ export default function BedwarsGeneralStats(
|
||||
wl: string
|
||||
}
|
||||
) {
|
||||
const stats = statsChecked!
|
||||
|
||||
return (
|
||||
<div className="flex mb-10">
|
||||
<div className="flex-1">
|
||||
|
||||
@@ -76,7 +76,7 @@ const ROWS: RowConfig[] = [
|
||||
{ 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
|
||||
|
||||
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 (
|
||||
<Table>
|
||||
<BedwarsTableHeader />
|
||||
|
||||
Reference in New Issue
Block a user