From 66277a90dc9edf6fd3e5245061fa5cfccea37518 Mon Sep 17 00:00:00 2001 From: Taken Date: Fri, 12 Sep 2025 12:11:19 +0200 Subject: [PATCH] Renamed components --- .../[ign]/_stats/murder-mystery/infection.tsx | 2 +- .../_stats/murder-mystery/murder-mystery.tsx | 4 +-- .../player/[ign]/_stats/skywars/client.tsx | 4 +-- .../[ign]/_stats/skywars/components.tsx | 10 +++--- .../player/[ign]/_stats/skywars/skywars.tsx | 6 ++-- .../[ign]/_stats/tnt-games/tnt-games.tsx | 4 +-- .../player/[ign]/_stats/tnt-games/wizards.tsx | 2 +- .../player/[ign]/_stats/woolgames/table.tsx | 35 +++++++++++++++++++ .../[ign]/_stats/woolgames/woolgames.tsx | 3 ++ 9 files changed, 54 insertions(+), 16 deletions(-) create mode 100644 src/app/(stats)/player/[ign]/_stats/woolgames/table.tsx diff --git a/src/app/(stats)/player/[ign]/_stats/murder-mystery/infection.tsx b/src/app/(stats)/player/[ign]/_stats/murder-mystery/infection.tsx index 29111a2..384288c 100644 --- a/src/app/(stats)/player/[ign]/_stats/murder-mystery/infection.tsx +++ b/src/app/(stats)/player/[ign]/_stats/murder-mystery/infection.tsx @@ -3,7 +3,7 @@ import { devide } from "@/lib/hypixel/general" import { NonNullStats } from "@/lib/schema/player" import { BasicStat } from "../../_components/Stats" -export default function InfectionStats({ stats }: { stats: NonNullable }) { +export default function MurderMysteryInfectionStats({ stats }: { stats: NonNullable }) { return (

Infection

diff --git a/src/app/(stats)/player/[ign]/_stats/murder-mystery/murder-mystery.tsx b/src/app/(stats)/player/[ign]/_stats/murder-mystery/murder-mystery.tsx index 9e76282..f6b79b0 100644 --- a/src/app/(stats)/player/[ign]/_stats/murder-mystery/murder-mystery.tsx +++ b/src/app/(stats)/player/[ign]/_stats/murder-mystery/murder-mystery.tsx @@ -2,7 +2,7 @@ import { Separator } from "@/components/ui/separator" import { formatNumber } from "@/lib/formatters" import { NonNullStats } from "@/lib/schema/player" import GeneralStats from "../GeneralStats" -import InfectionStats from "./infection" +import MurderMysteryInfectionStats from "./infection" import MurderMysteryGeneralStats from "./stats" import MurderMysteryStatTable from "./table" @@ -27,7 +27,7 @@ export default function MurderMysteryStats({ stats }: { stats: NonNullStats["Mur - + diff --git a/src/app/(stats)/player/[ign]/_stats/skywars/client.tsx b/src/app/(stats)/player/[ign]/_stats/skywars/client.tsx index 264e0af..4c24668 100644 --- a/src/app/(stats)/player/[ign]/_stats/skywars/client.tsx +++ b/src/app/(stats)/player/[ign]/_stats/skywars/client.tsx @@ -8,7 +8,7 @@ import Link from "next/link" import { useEffect, useState } from "react" import { Tooltip } from "react-tooltip" -export function PresigeousHeads({ heads }: { heads: { username: string, timestamp: number, sacrifice: string }[] }) { +export function SkywarsPresigeousHeads({ heads }: { heads: { username: string, timestamp: number, sacrifice: string }[] }) { const [pos, setPos] = useState({ x: 0, y: 0 }) useEffect(() => { @@ -51,7 +51,7 @@ export function PresigeousHeads({ heads }: { heads: { username: string, timestam ) } -export function HeadsBar({ heads, heads_total }: { heads: [string, number][], heads_total: number }) { +export function SkywarsHeadsBar({ heads, heads_total }: { heads: [string, number][], heads_total: number }) { const [pos, setPos] = useState({ x: 0, y: 0 }) useEffect(() => { diff --git a/src/app/(stats)/player/[ign]/_stats/skywars/components.tsx b/src/app/(stats)/player/[ign]/_stats/skywars/components.tsx index ae20cee..221d049 100644 --- a/src/app/(stats)/player/[ign]/_stats/skywars/components.tsx +++ b/src/app/(stats)/player/[ign]/_stats/skywars/components.tsx @@ -3,7 +3,7 @@ import { getSkywarsLevel } from "@/lib/hypixel/skywars/level" import { getSkyWarsIcon, getSkywarsPrestige } from "@/lib/hypixel/skywars/skywars" import { cn } from "@/lib/utils" import { GenericProgress } from "../../_components/GenericProgress" -import { HeadsBar, PresigeousHeads } from "./client" +import { SkywarsHeadsBar, SkywarsPresigeousHeads } from "./client" type SkywarsHeadsProps = { heads: number @@ -50,14 +50,14 @@ export function SkywarsHeads({ {"Total Heads Gathered: "} {formatNumber(heads)}

- {total_special > 0 ? :

This person has no heads collected.

} + {total_special > 0 ? :

This person has no heads collected.

}

Prestigious Head Collection

- {prestigeous.length > 0 ? :

No prestigeous heads. Now what a skill issue.

} + {prestigeous.length > 0 ? :

No prestigeous heads. Now what a skill issue.

}
) } -export function AngelOfDeath( +export function SkywarsAngelOfDeath( { shards, lifetime_shards, opals, lifetime_opals }: { shards: number, lifetime_shards: number, opals: number, lifetime_opals: number } ) { return ( @@ -82,7 +82,7 @@ export function AngelOfDeath( ) } -export function ShardProgress({ percent, shards }: { percent: number, shards: number }) { +export function SkywarsShardProgress({ percent, shards }: { percent: number, shards: number }) { return (

Shard Progress

diff --git a/src/app/(stats)/player/[ign]/_stats/skywars/skywars.tsx b/src/app/(stats)/player/[ign]/_stats/skywars/skywars.tsx index 314f4c0..b44a724 100644 --- a/src/app/(stats)/player/[ign]/_stats/skywars/skywars.tsx +++ b/src/app/(stats)/player/[ign]/_stats/skywars/skywars.tsx @@ -4,7 +4,7 @@ import { devide, getProgress } from "@/lib/hypixel/general" import { getSkywarsLevel, getSkywarsXpForLevel } from "@/lib/hypixel/skywars/level" import { NonNullStats } from "@/lib/schema/player" import GeneralStats from "../GeneralStats" -import { AngelOfDeath, ShardProgress, SkywarsHeads, SkywarsLevel, SkywarsProgress } from "./components" +import { SkywarsAngelOfDeath, SkywarsHeads, SkywarsLevel, SkywarsProgress, SkywarsShardProgress } from "./components" import SkyWarsGeneralStats from "./stats" import SkywarsStatTable from "./table" @@ -61,8 +61,8 @@ export default function SkyWarsStats(
- - + - + ) } diff --git a/src/app/(stats)/player/[ign]/_stats/tnt-games/wizards.tsx b/src/app/(stats)/player/[ign]/_stats/tnt-games/wizards.tsx index 52206ae..6bba01f 100644 --- a/src/app/(stats)/player/[ign]/_stats/tnt-games/wizards.tsx +++ b/src/app/(stats)/player/[ign]/_stats/tnt-games/wizards.tsx @@ -6,7 +6,7 @@ import { NonNullStats } from "@/lib/schema/player" import { GenericProgressNoTooltip } from "../../_components/GenericProgress" import { BasicStat } from "../../_components/Stats" -export default function TNTWizardsStats({ stats }: { stats: NonNullable }) { +export default function TNTGamesWizardsStats({ stats }: { stats: NonNullable }) { return (

TNT Wizards

diff --git a/src/app/(stats)/player/[ign]/_stats/woolgames/table.tsx b/src/app/(stats)/player/[ign]/_stats/woolgames/table.tsx new file mode 100644 index 0000000..aae2717 --- /dev/null +++ b/src/app/(stats)/player/[ign]/_stats/woolgames/table.tsx @@ -0,0 +1,35 @@ +import { Table, TableBody, TableHead, TableHeader, TableRow } from "@/components/ui/table" +import { NonNullStats } from "@/lib/schema/player" + +export default function WoolGamesStatTable({ stats }: { stats: NonNullable }) { + return ( + + + + +
+ ) +} + +function WoolGamesTableHeader() { + const headerElements = [ + "Class", + "Kills", + "Assists", + "Deaths", + "KD", + "Wool Placed", + "Wool Broken", + "Powerups" + ] + + return ( + + + {headerElements.map((v, i) => { + return {v} + })} + + + ) +} diff --git a/src/app/(stats)/player/[ign]/_stats/woolgames/woolgames.tsx b/src/app/(stats)/player/[ign]/_stats/woolgames/woolgames.tsx index 15845cb..87d9da5 100644 --- a/src/app/(stats)/player/[ign]/_stats/woolgames/woolgames.tsx +++ b/src/app/(stats)/player/[ign]/_stats/woolgames/woolgames.tsx @@ -7,6 +7,7 @@ import GeneralStats from "../GeneralStats" import { WoolGamesCaptureTheWool, WoolGamesSheepWars, WoolGamesWoolWars } from "./modes" import WoolGamesProgress from "./progress" import WoolGamesGeneralStats from "./stats" +import WoolGamesStatTable from "./table" export default function WoolGamesStats({ stats }: { stats: NonNullStats["WoolGames"] }) { if (!stats) return null @@ -47,6 +48,8 @@ export default function WoolGamesStats({ stats }: { stats: NonNullStats["WoolGam + + ) }