Small changees

This commit is contained in:
2025-09-20 00:39:42 +02:00
parent b13d6023ff
commit a874f586fb
2 changed files with 27 additions and 19 deletions

View File

@@ -33,6 +33,9 @@ export function WarlordsWeaponsBar({ stats }: { stats: NonNullable<NonNullStats[
<span className="font-bold">{"Total Weapons Repaired: "}</span> <span className="font-bold">{"Total Weapons Repaired: "}</span>
<span>{formatNumber(stats.repaired)}</span> <span>{formatNumber(stats.repaired)}</span>
</p> </p>
{stats.repaired > 0 ?
(
<>
<div className="flex overflow-hidden mt-2 mb-4 rounded-md"> <div className="flex overflow-hidden mt-2 mb-4 rounded-md">
{repaired.map(({ repaired, num }) => { {repaired.map(({ repaired, num }) => {
const percent = num / stats.repaired const percent = num / stats.repaired
@@ -56,5 +59,8 @@ export function WarlordsWeaponsBar({ stats }: { stats: NonNullable<NonNullStats[
</div> </div>
<Tooltip id="warlords-weapons-bar" position={pos} /> <Tooltip id="warlords-weapons-bar" position={pos} />
</> </>
) :
<p>This person has no Repaired weapons.</p>}
</>
) )
} }

View File

@@ -26,6 +26,8 @@ export function getUHCBestMode(stats: NonNullable<NonNullStats["UHC"]>) {
} }
} }
if (maxScore === 0) return null
return bestMode.id === "" ? "teams" : bestMode.id return bestMode.id === "" ? "teams" : bestMode.id
} }