Added online status to sidebar

This commit is contained in:
2025-09-13 23:28:47 +02:00
parent d754fc0b37
commit 781338a81b
7 changed files with 399 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import { Card, CardContent } from "@/components/ui/card"
import { env } from "@/lib/env/server"
import { getGuild } from "@/lib/hypixel/api/guild"
import { getUuid } from "@/lib/hypixel/api/mojang"
import { getSession } from "@/lib/hypixel/api/online"
import { getPlayer } from "@/lib/hypixel/api/player"
import { getExactLevel } from "@/lib/hypixel/general/level"
import { Loader2Icon, ShieldAlert } from "lucide-react"
@@ -78,6 +79,7 @@ async function SuspendedPage({ params }: Pick<PageProps<"/player/[ign]">, "param
)
}
const session = await getSession(mc.id)
const guild = await getGuild(mc.id)
const level = getExactLevel(player.networkExp)
@@ -109,6 +111,7 @@ async function SuspendedPage({ params }: Pick<PageProps<"/player/[ign]">, "param
rank={player.newPackageRank}
specialRank={player.rank}
eulaCoins={player.eulaCoins}
session={session}
/>
{player.stats !== undefined ?
(