import { WEBHOOK_SECRET } from "@mcpedia/config"; import { cookies } from "next/headers"; import DocForm from "@/components/DocForm"; import Link from "next/link"; // GET /create — show the document creation form. // Auth: requires the mcpedia_admin cookie (set via /api/auth/login). export const dynamic = "force-dynamic"; export default async function CreateDocPage() { const cookieStore = await cookies(); const canEdit = cookieStore.get("mcpedia_admin")?.value != null; if (!canEdit) { return (

Authentication required

You must be logged in to create documents.

Login
); } return (

Create Document

); }