Updated bestmodes
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
|
||||
import { formatNumber, formatSecondsToTime } from "@/lib/formatters"
|
||||
import { getAllBlitzKitStats, getBlitzKitLevel, getBlitzKitName, getBlitzMostPlayedKit } from "@/lib/hypixel/blitz/general"
|
||||
import { getAllBlitzKitStats, getBlitzBestMode, getBlitzKitLevel, getBlitzKitName, getBlitzMostPlayedKit } from "@/lib/hypixel/blitz/general"
|
||||
import { romanize } from "@/lib/hypixel/general"
|
||||
import { NonNullStats } from "@/lib/schema/player"
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
export function BlitzModeStatsTable({ stats }: { stats: NonNullable<NonNullStats["Blitz"]> }) {
|
||||
const best = getBlitzBestMode(stats)
|
||||
return (
|
||||
<Table>
|
||||
<TableHeader>
|
||||
@@ -16,12 +17,12 @@ export function BlitzModeStatsTable({ stats }: { stats: NonNullable<NonNullStats
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
<TableRow>
|
||||
<TableRow className={cn(best === "solo_normal" && "text-mc-light-purple")}>
|
||||
<TableCell>Solo Normal</TableCell>
|
||||
<TableCell>{formatNumber(stats.kills_solo_normal)}</TableCell>
|
||||
<TableCell>{formatNumber(stats.wins_solo_normal)}</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableRow className={cn(best === "teams_normal" && "text-mc-light-purple")}>
|
||||
<TableCell>Teams Normal</TableCell>
|
||||
<TableCell>{formatNumber(stats.kills_teams_normal)}</TableCell>
|
||||
<TableCell>{formatNumber(stats.wins_teams_normal)}</TableCell>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
|
||||
import { MODES } from "@/data/hypixel/build-battle"
|
||||
import { formatNumber } from "@/lib/formatters"
|
||||
import { getBuildBattleModeName as getBuildBattleMode } from "@/lib/hypixel/build-battle/general"
|
||||
import { getBuildBattleBestMode, getBuildBattleModeName as getBuildBattleMode } from "@/lib/hypixel/build-battle/general"
|
||||
import { NonNullStats } from "@/lib/schema/player"
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
export default function BuildBattleStatsTable({ stats }: { stats: NonNullable<NonNullStats["BuildBattle"]> }) {
|
||||
return (
|
||||
@@ -37,8 +38,10 @@ function TableStat({ modeId, stats }: { modeId: typeof MODES[number]["id"], stat
|
||||
)
|
||||
}
|
||||
|
||||
const isBest = getBuildBattleBestMode(stats) === modeId
|
||||
|
||||
return (
|
||||
<TableRow>
|
||||
<TableRow className={cn(isBest && "text-mc-light-purple")}>
|
||||
<TableCell>{mode.name}</TableCell>
|
||||
<TableCell>{formatNumber(stats[`wins_${modeId}`])}</TableCell>
|
||||
</TableRow>
|
||||
|
||||
Reference in New Issue
Block a user