Added globals json file
This commit is contained in:
1
app.globals.json
Normal file
1
app.globals.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -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(
|
||||
() => [
|
||||
|
||||
Reference in New Issue
Block a user