update to use segments

This commit is contained in:
Rami Bitar
2026-06-06 10:19:56 -04:00
parent 64610e997d
commit 0625487af0
3 changed files with 8 additions and 8 deletions

View File

@@ -9,8 +9,8 @@ import globals from "@/app.globals.json";
export default function Page() {
const params = useParams();
const slug = Array.isArray(params?.slug) ? (params.slug as string[]) : [];
const { key } = resolveRoute(slug);
const segments = Array.isArray(params?.slug) ? (params.slug as string[]) : [];
const { key } = resolveRoute(segments);
const { root, content } = (schema as any)[key] ?? {};
const data = { root, content, globals };
return <Render config={appConfig as any} data={data} />;