Added dumby pages
This commit is contained in:
9
src/app/(stats)/achievements/[ign]/_client.tsx
Normal file
9
src/app/(stats)/achievements/[ign]/_client.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
"use client"
|
||||
|
||||
import { usePathname } from "next/navigation"
|
||||
|
||||
export function AchievementsPageLoadText() {
|
||||
const path = usePathname()
|
||||
|
||||
return <p>{`Loading achievemnts for ${path.split("/").at(-1)}`}</p>
|
||||
}
|
||||
39
src/app/(stats)/achievements/[ign]/page.tsx
Normal file
39
src/app/(stats)/achievements/[ign]/page.tsx
Normal file
@@ -0,0 +1,39 @@
|
||||
import { env } from "@/lib/env/server"
|
||||
import { Loader2Icon, ShieldAlert } from "lucide-react"
|
||||
import { Suspense } from "react"
|
||||
import { AchievementsPageLoadText } from "./_client"
|
||||
|
||||
export default function AchievementsPage({ params }: PageProps<"/achievements/[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>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<Suspense
|
||||
fallback={
|
||||
<div className="flex flex-col justify-center items-center h-screen">
|
||||
<Loader2Icon className="animate-spin size-30" />
|
||||
<AchievementsPageLoadText />
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<SuspendedPage params={params} />
|
||||
</Suspense>
|
||||
)
|
||||
}
|
||||
|
||||
async function SuspendedPage({ params }: Pick<PageProps<"/achievements/[ign]">, "params">) {
|
||||
const { ign } = await params
|
||||
return (
|
||||
<div className="flex flex-col items-center pb-5 pt-35">
|
||||
{ign}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
9
src/app/(stats)/guild/[value]/_client.tsx
Normal file
9
src/app/(stats)/guild/[value]/_client.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
"use client"
|
||||
|
||||
import { usePathname } from "next/navigation"
|
||||
|
||||
export function GuildPageLoadText() {
|
||||
const path = usePathname()
|
||||
|
||||
return <p>{`Loading guild stats for ${path.split("/").at(-1)}`}</p>
|
||||
}
|
||||
39
src/app/(stats)/guild/[value]/page.tsx
Normal file
39
src/app/(stats)/guild/[value]/page.tsx
Normal file
@@ -0,0 +1,39 @@
|
||||
import { env } from "@/lib/env/server"
|
||||
import { Loader2Icon, ShieldAlert } from "lucide-react"
|
||||
import { Suspense } from "react"
|
||||
import { GuildPageLoadText } from "./_client"
|
||||
|
||||
export default function GuildPage({ params }: PageProps<"/guild/[value]">) {
|
||||
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>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<Suspense
|
||||
fallback={
|
||||
<div className="flex flex-col justify-center items-center h-screen">
|
||||
<Loader2Icon className="animate-spin size-30" />
|
||||
<GuildPageLoadText />
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<SuspendedPage params={params} />
|
||||
</Suspense>
|
||||
)
|
||||
}
|
||||
|
||||
async function SuspendedPage({ params }: Pick<PageProps<"/guild/[value]">, "params">) {
|
||||
const { value } = await params
|
||||
return (
|
||||
<div className="flex flex-col items-center pb-5 pt-35">
|
||||
{value}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -38,7 +38,7 @@ function SocialIcon({ href, children }: { href?: string, children: React.ReactNo
|
||||
|
||||
return (
|
||||
<Button variant="ghost" className="transition-all hover:scale-125" asChild>
|
||||
<Link href={href}>
|
||||
<Link href={new URL(href)}>
|
||||
{children}
|
||||
</Link>
|
||||
</Button>
|
||||
|
||||
9
src/app/(stats)/quests/[ign]/_client.tsx
Normal file
9
src/app/(stats)/quests/[ign]/_client.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
"use client"
|
||||
|
||||
import { usePathname } from "next/navigation"
|
||||
|
||||
export function QuestPageLoadText() {
|
||||
const path = usePathname()
|
||||
|
||||
return <p>{`Loading quests for ${path.split("/").at(-1)}`}</p>
|
||||
}
|
||||
39
src/app/(stats)/quests/[ign]/page.tsx
Normal file
39
src/app/(stats)/quests/[ign]/page.tsx
Normal file
@@ -0,0 +1,39 @@
|
||||
import { env } from "@/lib/env/server"
|
||||
import { Loader2Icon, ShieldAlert } from "lucide-react"
|
||||
import { Suspense } from "react"
|
||||
import { QuestPageLoadText } from "./_client"
|
||||
|
||||
export default function QuestsPage({ params }: PageProps<"/quests/[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>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<Suspense
|
||||
fallback={
|
||||
<div className="flex flex-col justify-center items-center h-screen">
|
||||
<Loader2Icon className="animate-spin size-30" />
|
||||
<QuestPageLoadText />
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<SuspendedPage params={params} />
|
||||
</Suspense>
|
||||
)
|
||||
}
|
||||
|
||||
async function SuspendedPage({ params }: Pick<PageProps<"/quests/[ign]">, "params">) {
|
||||
const { ign } = await params
|
||||
return (
|
||||
<div className="flex flex-col items-center pb-5 pt-35">
|
||||
{ign}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user