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

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

    const { novel_id } = await params;

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