import { getI18n } from "@/lib/i18n"; import { Username } from "@/components/Username"; import { notFound } from "next/navigation"; import Image from "next/image"; import { Header, Footer } from "@/components/Shell"; import { StartGame } from "@/components/StartGame"; import { getMap } from "@/lib/catalog"; import { ContributionInstructions } from "@/components/ContributionInstructions"; import { ReportContent } from "@/components/ReportContent"; import { user, admin, required } from "@/lib/supabase"; import { ExportMap } from "@/components/MapTransfer"; import { MapCommunity } from "@/components/MapCommunity"; import Link from "next/link"; import { ArrowLeft } from "lucide-react"; export default async function ServerPage({ params, }: { params: Promise<{ id: string }>; }) { const { t } = await getI18n(); const { id } = await params; const [map, account] = await Promise.all([getMap(id), user()]); if (!map) notFound(); const profileResult = account ? await admin() .from("profiles") .select("display_name") .eq("id", account.id) .maybeSingle() : null; if (profileResult?.error) required(profileResult); const profile = profileResult?.data; return ( <>