From a874f586fb15b8a5fa632c0941cca1d474c2741c Mon Sep 17 00:00:00 2001 From: Taken Date: Sat, 20 Sep 2025 00:39:42 +0200 Subject: [PATCH] Small changees --- .../player/[ign]/_stats/warlords/client.tsx | 44 +++++++++++-------- src/lib/hypixel/uhc/general.ts | 2 + 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/src/app/(stats)/player/[ign]/_stats/warlords/client.tsx b/src/app/(stats)/player/[ign]/_stats/warlords/client.tsx index b3d080a..79636ce 100644 --- a/src/app/(stats)/player/[ign]/_stats/warlords/client.tsx +++ b/src/app/(stats)/player/[ign]/_stats/warlords/client.tsx @@ -33,28 +33,34 @@ export function WarlordsWeaponsBar({ stats }: { stats: NonNullable{"Total Weapons Repaired: "} {formatNumber(stats.repaired)}

-
- {repaired.map(({ repaired, num }) => { - const percent = num / stats.repaired + {stats.repaired > 0 ? + ( + <> +
+ {repaired.map(({ repaired, num }) => { + const percent = num / stats.repaired - if (percent === 0) return null + if (percent === 0) return null - return ( -
+ return ( +
+
+ ) + })}
- ) - })} -
- + + + ) : +

This person has no Repaired weapons.

} ) } diff --git a/src/lib/hypixel/uhc/general.ts b/src/lib/hypixel/uhc/general.ts index b507684..9cf4d70 100644 --- a/src/lib/hypixel/uhc/general.ts +++ b/src/lib/hypixel/uhc/general.ts @@ -26,6 +26,8 @@ export function getUHCBestMode(stats: NonNullable) { } } + if (maxScore === 0) return null + return bestMode.id === "" ? "teams" : bestMode.id }