Updated page to support maintance mode
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import DisplayName from "@/components/player/displayname"
|
||||
import { Accordion } from "@/components/ui/accordion"
|
||||
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 { getPlayer } from "@/lib/hypixel/api/player"
|
||||
import { getExactLevel } from "@/lib/hypixel/general/level"
|
||||
import { Loader2Icon } from "lucide-react"
|
||||
import { Loader2Icon, ShieldAlert } from "lucide-react"
|
||||
import { Metadata } from "next"
|
||||
import { Suspense } from "react"
|
||||
import Sidebar from "./_components/Sidebar"
|
||||
@@ -23,6 +24,17 @@ export async function generateMetadata({ params }: { params: Promise<{ ign: stri
|
||||
}
|
||||
|
||||
export default async function PlayerPage({ params }: PageProps<"/player/[ign]">) {
|
||||
const maintenance = env.MAINTENANCE_MODE
|
||||
|
||||
if (maintenance) {
|
||||
return (
|
||||
<div className="flex flex-col gap-2 justify-center items-center h-screen">
|
||||
<ShieldAlert className="size-30" />
|
||||
<h1 className="text-xl">Not available right now. This is just so I could have a front page for Hypixel Production API Key.</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const { ign } = await params
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user