import EditChapterPage from "@/components/user/novel/chapter/edit/editChapterPage";
import { cookies } from "next/headers";

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

    const { novel_id, chapter_id } = await params;

    return (
        <EditChapterPage
            token={rawToken}
            postId={novel_id}
            chapterId={chapter_id}
        />
    );
}