Improve MineGeo UI and application flows
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 2m37s
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 2m37s
This commit is contained in:
24
app/tournaments/[id]/page.tsx
Normal file
24
app/tournaments/[id]/page.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Header, Footer } from "@/components/Shell";
|
||||
import { TournamentLobby } from "@/components/TournamentLobby";
|
||||
import { user } from "@/lib/supabase";
|
||||
import { notFound } from "next/navigation";
|
||||
import { z } from "zod";
|
||||
|
||||
export default async function TournamentPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ id: string }>;
|
||||
}) {
|
||||
const { id } = await params;
|
||||
if (!z.string().uuid().safeParse(id).success) notFound();
|
||||
const account = await user();
|
||||
return (
|
||||
<>
|
||||
<Header />
|
||||
<main id="main-content">
|
||||
<TournamentLobby id={id} signedIn={!!account} />
|
||||
</main>
|
||||
<Footer />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user