Updated display name and heads display
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"use client"
|
||||
|
||||
import { head } from "@/lib/hypixel/general"
|
||||
import { getHeads } from "@/lib/hypixel/skywars/skywars"
|
||||
import { cn } from "@/lib/utils"
|
||||
import Image from "next/image"
|
||||
@@ -36,7 +37,7 @@ export function PresigeousHeads({ heads }: { heads: { username: string, timestam
|
||||
data-id="presigeous-heads"
|
||||
data-tooltip-id="presigeous-heads"
|
||||
data-tooltip-content={text}
|
||||
src={`https://minotar.net/helm/${username}/24.png`}
|
||||
src={head(username, 24)}
|
||||
width={24}
|
||||
height={24}
|
||||
alt={username}
|
||||
|
||||
@@ -81,6 +81,7 @@ async function SuspendedPage({ ign: pign }: { ign: string }) {
|
||||
<div className="flex flex-col items-center pb-5">
|
||||
<DisplayName
|
||||
ign={player.displayname}
|
||||
uuid={player.uuid}
|
||||
rank={player.newPackageRank}
|
||||
monthly={player.monthlyPackageRank}
|
||||
rankColor={player.monthlyRankColor}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { getColor } from "@/lib/colors"
|
||||
import { head } from "@/lib/hypixel/general"
|
||||
import { Player } from "@/lib/schema/player"
|
||||
import Image from "next/image"
|
||||
import Link from "next/link"
|
||||
@@ -9,8 +10,9 @@ type MonthlyPackageRank = Player["player"]["monthlyPackageRank"]
|
||||
type RankColor = Player["player"]["monthlyRankColor"]
|
||||
|
||||
export default function DisplayName(
|
||||
{ ign, rank, monthly, rankColor, plusColor, guildTag, tagColor, specialRank, lastLogin, lastLogout, prefix }: {
|
||||
{ ign, uuid, rank, monthly, rankColor, plusColor, guildTag, tagColor, specialRank, lastLogin, lastLogout, prefix }: {
|
||||
ign: string
|
||||
uuid: string
|
||||
rank: NewPackageRank
|
||||
monthly: MonthlyPackageRank
|
||||
rankColor: RankColor
|
||||
@@ -25,11 +27,11 @@ export default function DisplayName(
|
||||
) {
|
||||
return (
|
||||
<div className="flex gap-2 items-center mt-35">
|
||||
<Link href={`/player/${ign}`}>
|
||||
<Link href={`https://namemc.com/profile/${uuid}`}>
|
||||
<Image
|
||||
src={`https://minotar.net/helm/${ign}/36.png`}
|
||||
width={36}
|
||||
height={36}
|
||||
src={head(uuid, 40)}
|
||||
width={40}
|
||||
height={40}
|
||||
alt={ign}
|
||||
unoptimized
|
||||
className="shadow-2xl"
|
||||
|
||||
@@ -78,3 +78,7 @@ export function romanize(num: number) {
|
||||
const thousands = Number(digits.join(""))
|
||||
return "M".repeat(thousands) + roman
|
||||
}
|
||||
|
||||
export function head(val: string, size: number) {
|
||||
return `https://vzge.me/face/${size}/${val}?no-shadow,cape,ears,overlay`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user