Add map-specific tournament creation link
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 3m31s

This commit is contained in:
2026-10-18 13:32:56 +05:00
parent a7085e4e80
commit da1a50a6ad
10 changed files with 74 additions and 9 deletions

View File

@@ -2,13 +2,20 @@ import { Header, Footer } from "@/components/Shell";
import { TournamentIndex } from "@/components/TournamentLobby";
import { user } from "@/lib/supabase";
export default async function TournamentsPage() {
export default async function TournamentsPage({
searchParams,
}: {
searchParams: Promise<{ map?: string | string[] }>;
}) {
const account = await user();
const { map } = await searchParams;
const initialMapId =
typeof map === "string" && /^[0-9a-f-]{36}$/i.test(map) ? map : null;
return (
<>
<Header />
<main id="main-content">
<TournamentIndex signedIn={!!account} />
<TournamentIndex signedIn={!!account} initialMapId={initialMapId} />
</main>
<Footer />
</>