Files
react-editor-shopify/app/edit/[[...path]]/page.tsx
2026-05-02 09:18:15 -04:00

22 lines
588 B
TypeScript

import { readSchema } from "~/lib/schema.server";
import EditorClient from "~/components/EditorClient";
export const dynamic = "force-dynamic";
export default async function EditPage({
params,
}: {
params: Promise<{ path?: string[] }>;
}) {
const { path } = await params;
const segments = (path ?? []).filter(Boolean);
const route = segments.length === 0 ? "/" : "/" + segments.join("/");
const schema = await readSchema();
return (
<div style={{ height: "100vh", width: "100vw" }}>
<EditorClient initialSchema={schema} initialPath={route} />
</div>
);
}