feat(web): render cms pages and navigation from db

This commit is contained in:
2026-02-12 19:58:01 +01:00
parent 281b1d7a1b
commit f65a9ea03f
11 changed files with 273 additions and 75 deletions

View File

@@ -0,0 +1,21 @@
import { getPublishedPageBySlug } from "@cms/db"
import { notFound } from "next/navigation"
import { PublicPageView } from "@/components/public-page-view"
export const dynamic = "force-dynamic"
type PageProps = {
params: Promise<{ slug: string }>
}
export default async function CmsPageRoute({ params }: PageProps) {
const { slug } = await params
const page = await getPublishedPageBySlug(slug)
if (!page) {
notFound()
}
return <PublicPageView page={page} />
}