Updated build battle with new titles
This commit is contained in:
@@ -4,6 +4,7 @@ import { Separator } from "@/components/ui/separator"
|
||||
import { formatNumber } from "@/lib/formatters"
|
||||
import { getBuildBattleRank } from "@/lib/hypixel/build-battle/general"
|
||||
import { NonNullStats } from "@/lib/schema/player"
|
||||
import { cn } from "@/lib/utils"
|
||||
import CollapsedStats from "../../_components/CollapsedStats"
|
||||
import BuildBattleTitleProgress from "./progress"
|
||||
import BuildBattleGeneralStats from "./stats"
|
||||
@@ -25,7 +26,7 @@ export default function BuildBattleStats({ stats }: { stats: NonNullStats["Build
|
||||
stats={[
|
||||
{
|
||||
title: <p>Title</p>,
|
||||
stat: <p className={`font-bold text-mc-${rank.color}`}>{rank.name}</p>
|
||||
stat: <p className={cn(rank.bold && "font-bold", `text-mc-${rank.color}`)}>{rank.name}</p>
|
||||
},
|
||||
{
|
||||
title: <p>Wins</p>,
|
||||
|
||||
@@ -14,11 +14,11 @@ export default function BuildBattleTitleProgress({ score }: { score: number }) {
|
||||
<GenericProgress
|
||||
percent={percent}
|
||||
tooltipId="build-battle-progress"
|
||||
tooltipContent={`${score}/${next !== null ? next.value : 0} Score`}
|
||||
tooltipContent={`${score}/${next.value} Score`}
|
||||
className={`bg-mc-${current.color}`}
|
||||
/>
|
||||
<p className={cn("font-bold", next !== null ? `text-mc-${next.color}` : "text-mc-gold")}>
|
||||
{next !== null ? next.name : "Already max rank"}
|
||||
<p className={cn(next.bold && "font-bold", `text-mc-${next.color}`)}>
|
||||
{next.name}
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -2,6 +2,7 @@ import { formatNumber } from "@/lib/formatters"
|
||||
import { getBuildBattleRank } from "@/lib/hypixel/build-battle/general"
|
||||
import { devide } from "@/lib/hypixel/general"
|
||||
import { NonNullStats } from "@/lib/schema/player"
|
||||
import { cn } from "@/lib/utils"
|
||||
import { BasicStat } from "../../_components/Stats"
|
||||
|
||||
export default function BuildBattleGeneralStats({ stats }: { stats: NonNullable<NonNullStats["BuildBattle"]> }) {
|
||||
@@ -10,7 +11,7 @@ export default function BuildBattleGeneralStats({ stats }: { stats: NonNullable<
|
||||
<div className="flex">
|
||||
<div className="flex-1">
|
||||
<BasicStat title="Score: " value={formatNumber(stats.score)} />
|
||||
<BasicStat title="Title: " value={rank.name} className={`font-bold text-mc-${rank.color}`} />
|
||||
<BasicStat title="Title: " value={rank.name} className={cn(rank.bold && "font-bold", `text-mc-${rank.color}`)} />
|
||||
<BasicStat title="Tokens: " value={formatNumber(stats.coins)} className="text-mc-dark-green" />
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
|
||||
Reference in New Issue
Block a user