finished woolgames progress

This commit is contained in:
2025-09-11 00:35:46 +02:00
parent c7ed674a34
commit ebdfebe20a
2 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import { formatNumber } from "@/lib/formatters"
import { getWoolGamesPrestige, getWoolGamesXPForLevel } from "@/lib/hypixel/woolgames/general"
import { GenericProgress } from "../../_components/GenericProgress"
export default function WoolGamesProgress({ xp, level }: { xp: number, level: number }) {
const pres = getWoolGamesPrestige(Math.floor(level))
const next = getWoolGamesPrestige(Math.floor(level) + 1)
const percent = (level - Math.floor(level)) * 100
const xpProgress = formatNumber(Math.floor(xp - getWoolGamesXPForLevel(Math.floor(level))))
const ceilingXp = formatNumber(Math.floor(getWoolGamesXPForLevel(Math.floor(level) + 1) - getWoolGamesXPForLevel(Math.floor(level))))
return (
<div className="flex gap-2">
<p className={`text-mc-${pres.color}`}>{Math.floor(level)}</p>
<GenericProgress
tooltipId="woolgamesprogress"
tooltipContent={`${xpProgress}/${ceilingXp} XP`}
percent={percent}
className="bg-mc-red"
/>
<p className={`text-mc-${next.color}`}>{Math.floor(level) + 1}</p>
</div>
)
}