Add account based multiplayer hosting and bug report retention

This commit is contained in:
2026-10-10 16:24:34 +05:00
parent 9af71c85c2
commit fc6da6756d
33 changed files with 1538 additions and 102 deletions

View File

@@ -8,6 +8,7 @@ import { getMap } from "@/lib/catalog";
import { ContributionInstructions } from "@/components/ContributionInstructions";
import { ReportContent } from "@/components/ReportContent";
import { user } from "@/lib/supabase";
import { accountProfile } from "@/lib/profile";
import { ExportMap } from "@/components/MapTransfer";
export default async function ServerPage({
params,
@@ -19,6 +20,7 @@ export default async function ServerPage({
const map = await getMap(id);
if (!map) notFound();
const account = await user();
const profile = account ? await accountProfile(account) : null;
return (
<>
<Header />
@@ -63,7 +65,7 @@ export default async function ServerPage({
</span>
</div>
</div>
<StartGame datasetId={id} />
<StartGame datasetId={id} hostName={profile?.display_name ?? null} />
</div>
{map.allow_contributions && (
<ContributionInstructions