Style changes
This commit is contained in:
@@ -28,7 +28,7 @@ export default function CopsAndCrimsStats({ stats }: { stats: NonNullStats["Cops
|
||||
stats={[
|
||||
{
|
||||
title: <p>Score</p>,
|
||||
stat: <p className={`font-bold text-mc-${scoreColor}`}>{formatNumber(score)}</p>
|
||||
stat: <p className={`text-mc-${scoreColor}`}>{formatNumber(score)}</p>
|
||||
},
|
||||
{
|
||||
title: <p>Kills</p>,
|
||||
|
||||
@@ -29,7 +29,7 @@ export default function DuelsStats({ stats }: { stats: NonNullStats["Duels"] })
|
||||
{
|
||||
title: <p>Division</p>,
|
||||
stat: (
|
||||
<p className="font-bold">
|
||||
<p>
|
||||
{div !== null ?
|
||||
(
|
||||
<span className={`text-mc-${div.color}`}>
|
||||
|
||||
@@ -31,7 +31,7 @@ export default function MegaWallsStats({ stats }: { stats: NonNullStats["MegaWal
|
||||
{
|
||||
title: <p>Main</p>,
|
||||
stat: (
|
||||
<p className={cn("font-bold", mostPlayed && `text-mc-${difficultyColor}`)}>
|
||||
<p className={cn(mostPlayed && `text-mc-${difficultyColor}`)}>
|
||||
{mostPlayed !== null ? mostPlayed.name : "Unknown"}
|
||||
</p>
|
||||
)
|
||||
|
||||
18
src/app/(stats)/player/[ign]/_stats/pit/level.tsx
Normal file
18
src/app/(stats)/player/[ign]/_stats/pit/level.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { romanize } from "@/lib/hypixel/general"
|
||||
import { getLevelColor, getPrestigeColor } from "@/lib/hypixel/pit/general"
|
||||
import { getPitLevel } from "@/lib/hypixel/pit/level"
|
||||
|
||||
export default function PitLevel({ xp, prestige }: { xp: number, prestige: number }) {
|
||||
const level = getPitLevel(xp, prestige)
|
||||
const prestigeColor = getPrestigeColor(prestige)
|
||||
const levelColor = getLevelColor(level)
|
||||
return (
|
||||
<p>
|
||||
<span className={`text-mc-${prestigeColor}`}>[</span>
|
||||
{prestige > 0 && <span className="text-mc-yellow">{romanize(prestige)}</span>}
|
||||
{prestige > 0 && <span className={`text-mc-${prestigeColor}`}>-</span>}
|
||||
<span className={`text-mc-${levelColor}`}>{level}</span>
|
||||
<span className={`text-mc-${prestigeColor}`}>]</span>
|
||||
</p>
|
||||
)
|
||||
}
|
||||
@@ -2,11 +2,11 @@ import { AccordionContent, AccordionItem, AccordionTrigger } from "@/components/
|
||||
import { Card, CardContent } from "@/components/ui/card"
|
||||
import { Separator } from "@/components/ui/separator"
|
||||
import { formatNumber } from "@/lib/formatters"
|
||||
import { devide, romanize } from "@/lib/hypixel/general"
|
||||
import { getLevelColor, getPrestige, getPrestigeColor } from "@/lib/hypixel/pit/general"
|
||||
import { getPitLevel } from "@/lib/hypixel/pit/level"
|
||||
import { devide } from "@/lib/hypixel/general"
|
||||
import { getPrestige } from "@/lib/hypixel/pit/general"
|
||||
import { NonNullStats } from "@/lib/schema/player"
|
||||
import CollapsedStats from "../../_components/CollapsedStats"
|
||||
import PitLevel from "./level"
|
||||
import PitProgress from "./progress"
|
||||
import PitGeneralStats from "./stats"
|
||||
|
||||
@@ -15,9 +15,6 @@ export default function PitStats({ stats }: { stats: NonNullStats["Pit"] }) {
|
||||
|
||||
const kd = formatNumber(devide(stats.kills, stats.deaths))
|
||||
const prestige = getPrestige(stats)
|
||||
const level = getPitLevel(stats.profile.xp, prestige)
|
||||
const prestigeColor = getPrestigeColor(prestige)
|
||||
const levelColor = getLevelColor(level)
|
||||
|
||||
return (
|
||||
<AccordionItem value="pit">
|
||||
@@ -30,15 +27,7 @@ export default function PitStats({ stats }: { stats: NonNullStats["Pit"] }) {
|
||||
stats={[
|
||||
{
|
||||
title: <p>Level</p>,
|
||||
stat: (
|
||||
<p className="font-bold">
|
||||
<span className={`text-mc-${prestigeColor}`}>[</span>
|
||||
{prestige > 0 && <span className="text-mc-yellow">{romanize(prestige)}</span>}
|
||||
{prestige > 0 && <span className={`text-mc-${prestigeColor}`}>-</span>}
|
||||
<span className={`text-mc-${levelColor}`}>{level}</span>
|
||||
<span className={`text-mc-${prestigeColor}`}>]</span>
|
||||
</p>
|
||||
)
|
||||
stat: <PitLevel xp={stats.profile.xp} prestige={prestige} />
|
||||
},
|
||||
{
|
||||
title: <p>Kills</p>,
|
||||
|
||||
Reference in New Issue
Block a user