Update React Editor integration and clean up template

This commit is contained in:
Rami Bitar
2026-08-15 13:47:33 -04:00
parent 0a7ea0bf6b
commit 0fb6cef226
82 changed files with 113 additions and 913 deletions
-14
View File
@@ -10,20 +10,6 @@ export type PageData = {
globals?: unknown;
};
/**
* Shared renderer for a route. Drop a `page.json` next to a route's `page.tsx`,
* import it, and hand it here:
*
* import page from "./page.json";
* export default () => <PageRender page={page} />;
*
* The same `appConfig` backs `PageEditor`, so what an editor sees is what the
* route ships.
*
* `app.globals.json` carries the props of blocks marked `global: true` — the
* header and footer. Every page.json references them via `"synced": true`, so
* editing the header once updates all thirteen routes.
*/
export default function PageRender({ page }: { page: PageData }) {
const data = { root: page.root, content: page.content, globals };
return <Render config={appConfig as any} data={data as any} />;