UNPKG

@oberoncms/core

Version:

OberonCMS is a cloud deployable CMS written in typescript based on the Puck visual editor

20 lines (19 loc) 496 B
import { jsx } from "react/jsx-runtime"; import { Render as Render$1 } from "@measured/puck/rsc"; import { notFound } from "next/navigation"; import { resolveSlug } from "./lib/utils.js"; async function Render({ path = [], config: { components }, adapter: { getPageData } }) { const slug = resolveSlug(path); const data = await getPageData(slug); if (!data) { return notFound(); } return /* @__PURE__ */ jsx(Render$1, { data, config: { components } }); } export { Render };