Files
MineGeo/app/dashboard/[id]/page.tsx

25 lines
687 B
TypeScript

import { Header, Footer } from "@/components/Shell";
import { DraftEditor } from "@/components/DraftEditor";
import { user } from "@/lib/supabase";
import { redirect } from "next/navigation";
export default async function Draft({
params,
}: {
params: Promise<{ id: string }>;
}) {
const { id } = await params;
if (!(await user()))
redirect(`/log-in?next=${encodeURIComponent("/dashboard/" + id)}`);
return (
<>
<Header />
<main className="section page-content">
<span className="eyebrow">YOUR WORLD, BEFORE THE WORLD SEES IT</span>
<h1>At the drawing board.</h1>
<DraftEditor id={id} />
</main>
<Footer />
</>
);
}