import { getI18n } from "@/lib/i18n"; 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 } from "@/lib/supabase"; import { ExportMap } from "@/components/MapTransfer"; export default async function ServerPage({ params, }: { params: Promise<{ id: string }>; }) { const { t } = await getI18n(); const { id } = await params; const map = await getMap(id); if (!map) notFound(); const account = await user(); return ( <> {map.source === "plugin" ? t("SERVER EXPORT") : t("PLAYER CONTRIBUTION")}{" "} {t("· MINECRAFT 1.21.11")} {map.name} {map.description} {t("Created by")} {map.credit} {account?.id === map.owner_id && } {t("Map ID:")} {map.id} {map.panorama_count} {t("panoramas")} {t("Overworld surface")} {map.bounds.maxX - map.bounds.minX} ×{" "} {map.bounds.maxZ - map.bounds.minZ} {t("blocks")} {map.allow_contributions && ( )} > ); }
{map.description}
{t("Created by")} {map.credit}
{t("Map ID:")} {map.id}
{map.id}