diff --git a/src/app/(stats)/player/[ign]/_stats/skywars/client.tsx b/src/app/(stats)/player/[ign]/_stats/skywars/client.tsx index 3ec3b5e..3fc2fb5 100644 --- a/src/app/(stats)/player/[ign]/_stats/skywars/client.tsx +++ b/src/app/(stats)/player/[ign]/_stats/skywars/client.tsx @@ -70,9 +70,11 @@ export function HeadsBar({ heads, heads_total }: { heads: [string, number][], he return ( <>
- {heads.map(([key, total], index) => { + {heads.map(([key, total]) => { const head = getHeads(key) - const percent = heads_total === 0 ? 0 : total / heads_total + const percent = total / heads_total + + if (percent === 0) return null return (
- + diff --git a/src/app/(stats)/player/[ign]/_stats/skywars/stats.tsx b/src/app/(stats)/player/[ign]/_stats/skywars/stats.tsx index ac4626e..a454d13 100644 --- a/src/app/(stats)/player/[ign]/_stats/skywars/stats.tsx +++ b/src/app/(stats)/player/[ign]/_stats/skywars/stats.tsx @@ -4,15 +4,7 @@ import { NonNullStats } from "@/lib/schema/player" import { BasicStat, Stat } from "../../_components/Stats" import { SkywarsPrestige } from "./components" -export default function SkyWarsGeneralStats({ - statsChecked, - level -}: { - statsChecked: NonNullStats["SkyWars"] - level: number -}) { - const stats = statsChecked! - +export default function SkyWarsGeneralStats({ stats, level }: { stats: NonNullable, level: number }) { function getCorruptionLevel() { let num = stats.angel_of_death_level + stats.angels_offering diff --git a/src/app/(stats)/player/[ign]/_stats/skywars/table.tsx b/src/app/(stats)/player/[ign]/_stats/skywars/table.tsx index e2a7d2e..d45b8fd 100644 --- a/src/app/(stats)/player/[ign]/_stats/skywars/table.tsx +++ b/src/app/(stats)/player/[ign]/_stats/skywars/table.tsx @@ -4,7 +4,7 @@ import { _SkywarsStats, concatSkywarsStats, getBestMode, getSkywarsModeStats } f import { NonNullStats } from "@/lib/schema/player" import { cn } from "@/lib/utils" -export default function SkywarsStatTable({ stats }: { stats: NonNullStats["SkyWars"] }) { +export default function SkywarsStatTable({ stats }: { stats: NonNullable }) { return (