Updated stats

This commit is contained in:
2025-08-23 21:29:49 +02:00
parent 96df2a6c45
commit f876ad15fa
10 changed files with 122 additions and 45 deletions

View File

@@ -6,7 +6,7 @@ type MonthlyPackageRank = Player["player"]["monthlyPackageRank"]
type RankColor = Player["player"]["monthlyRankColor"]
export default function DisplayName(
{ ign, rank, monthly, rankColor, plusColor, guildTag, tagColor }: {
{ ign, rank, monthly, rankColor, plusColor, guildTag, tagColor, specialRank }: {
ign: string
rank: NewPackageRank
monthly: MonthlyPackageRank
@@ -14,17 +14,37 @@ export default function DisplayName(
plusColor: string | undefined
guildTag: string | undefined
tagColor: string | undefined
specialRank: string | undefined
}
) {
return (
<>
<PlayerRank rank={rank} monthly={monthly} plusColor={plusColor} rankColor={rankColor} />{" "}
<PlayerIGN ign={ign} rank={rank} monthly={monthly} rankColor={rankColor} /> <GuildTag tag={guildTag} tagColor={tagColor} />
<PlayerRank rank={rank} monthly={monthly} plusColor={plusColor} rankColor={rankColor} specialRank={specialRank} />{" "}
<PlayerIGN ign={ign} rank={rank} monthly={monthly} rankColor={rankColor} specialRank={specialRank} />{" "}
<GuildTag tag={guildTag} tagColor={tagColor} />
</>
)
}
function PlayerIGN({ ign, rank, monthly, rankColor }: { ign: string, rank: NewPackageRank, monthly: MonthlyPackageRank, rankColor: RankColor }) {
function PlayerIGN(
{ ign, rank, monthly, rankColor, specialRank }: {
ign: string
rank: NewPackageRank
monthly: MonthlyPackageRank
rankColor: RankColor
specialRank: string | undefined
}
) {
if (specialRank) {
if (specialRank === "YOUTUBER") {
return <span className="text-mc-red">{ign}</span>
}
if (specialRank === "STAFF") {
return <span className="text-mc-red">{ign}</span>
}
}
if (monthly === "SUPERSTAR") {
if (rankColor === "GOLD") {
return <span className="text-mc-gold">{ign}</span>
@@ -48,8 +68,36 @@ function PlayerIGN({ ign, rank, monthly, rankColor }: { ign: string, rank: NewPa
}
function PlayerRank(
{ rank, monthly, plusColor, rankColor }: { rank: NewPackageRank, monthly: MonthlyPackageRank, plusColor?: string, rankColor: RankColor }
{ rank, monthly, plusColor, rankColor, specialRank }: {
rank: NewPackageRank
monthly: MonthlyPackageRank
plusColor?: string
rankColor: RankColor
specialRank: string | undefined
}
) {
if (specialRank) {
if (specialRank === "YOUTUBER") {
return (
<>
<span className="text-mc-red">[</span>
<span className="text-mc-white">YOUTUBE</span>
<span className="text-mc-red">]</span>
</>
)
}
if (specialRank === "STAFF") {
return (
<>
<span className="text-mc-red">[</span>
<span className="text-mc-gold"></span>
<span className="text-mc-red">]</span>
</>
)
}
}
if (monthly === "SUPERSTAR") {
if (rankColor === "GOLD") {
return (