Finished first column of duels stats

This commit is contained in:
2025-09-01 20:13:49 +02:00
parent 22eb67d5d1
commit 542cdc1cd8
4 changed files with 58 additions and 2 deletions

View File

@@ -2,6 +2,11 @@ import { DIVISIONS, MODES } from "@/data/hypixel/duels"
import { NonNullStats } from "@/lib/schema/player"
type DuelType = "all_modes"
export type Div = {
name: typeof DIVISIONS[number]["name"]
level: number
color: typeof DIVISIONS[number]["color"]
}
export function getDivision(duelType: DuelType, stats: NonNullable<NonNullStats["Duels"]>) {
for (const div of DIVISIONS.slice().reverse()) {