From 244832db647151278acc63dcb77c7d3b8a9f83f0 Mon Sep 17 00:00:00 2001 From: Rami Bitar Date: Thu, 4 Jun 2026 20:26:07 -0400 Subject: [PATCH] Added globals json file --- app.globals.json | 1 + app/editor/[[...slug]]/page.tsx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 app.globals.json diff --git a/app.globals.json b/app.globals.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/app.globals.json @@ -0,0 +1 @@ +{} diff --git a/app/editor/[[...slug]]/page.tsx b/app/editor/[[...slug]]/page.tsx index 42224fc..cf52f3e 100644 --- a/app/editor/[[...slug]]/page.tsx +++ b/app/editor/[[...slug]]/page.tsx @@ -11,12 +11,14 @@ import { mediaAdapter } from "@/lib/adapters/media-adapter"; import { appConfig } from "@/editor.config"; import resolveRoute from "@/lib/resolve-route"; import schema from "@/app.schema.json"; +import globals from "@/app.globals.json"; export default function EditorPage() { const params = useParams(); const slug = Array.isArray(params?.slug) ? (params.slug as string[]) : []; const { key, path, params: routeParams } = resolveRoute(slug); - const data = (schema as any)[key]; + const { root, content } = (schema as any)[key] ?? {}; + const data = { root, content, globals }; const plugins = useMemo( () => [