import CreateChapterPage from "@/components/user/novella/chapter/create/createChapterPage";
import { cookies } from "next/headers";

export default async function Page({ params }: { params: Promise<{ locale: string; novella_id: string }> }) {
    const cookieStore = await cookies();
    const rawToken = cookieStore.get("token")!.value.slice(1, -1);

    const { novella_id } = await params;

    return (
        <CreateChapterPage
            token={rawToken}
            postId={novella_id}
        />
    );
}
