import { PageProps } from "@/app/(client)/[slug]/page";
import Tiptap from "@/components/Tiptap/Tiptap";

export default async function EditorPage({ params }: PageProps) {
    const { slug } = await params;

    const pageData = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/api/pages/${slug}`, {
        //next: { revalidate: 60 },
    }).then(res => res.json());

    return (
        <Tiptap slug={slug} data={pageData} />
    )
}