import { fetchPage } from "@/lib/fetchers"; import { RenderBlock } from "@/components/registry"; import { notFound } from "next/navigation"; import { cookies } from "next/headers"; export const revalidate = 60; // ISR: 60秒后重新验证 export default async function Page({ params }: any) { const { slug } = await params const jwt = (await cookies()).get('jwt')?.value const page = await fetchPage(slug, jwt); if (!page) { return notFound(); } return (
{/* 页面标题 */}

{page.title}

{/* 渲染所有块 */}
{page.blocks.map((block) => ( ))}
); }