Files
MineGeo/app/dashboard/[id]/page.tsx
pavel444-byte 927923dc95
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 11m31s
Improve accessibility and polish page styling
2026-10-24 14:11:17 +05:00

30 lines
941 B
TypeScript

import { getI18n } from "@/lib/i18n";
import { Header, Footer } from "@/components/Shell";
import { DraftEditor } from "@/components/DraftEditor";
import { user } from "@/lib/supabase";
import { accountProfile } from "@/lib/profile";
import { redirect } from "next/navigation";
export default async function Draft({
params,
}: {
params: Promise<{ id: string }>;
}) {
const { t } = await getI18n();
const { id } = await params;
const account = await user();
if (!account)
redirect(`/log-in?next=${encodeURIComponent("/dashboard/" + id)}`);
const profile = await accountProfile(account);
return (
<>
<Header />
<main className="section page-content" id="main-content" tabIndex={-1}>
<span className="eyebrow">{t("YOUR WORLD · YOUR LOCATIONS")}</span>
<h1>{t("Map workshop")}</h1>
<DraftEditor id={id} hostName={profile.display_name} />
</main>
<Footer />
</>
);
}