mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-03 08:36:01 +00:00
33 lines
918 B
TypeScript
33 lines
918 B
TypeScript
import { Suspense, lazy } from "react";
|
|
import { useBkndData } from "ui/client/schema/data/use-bknd-data";
|
|
import { Button } from "ui/components/buttons/Button";
|
|
import * as AppShell from "ui/layouts/AppShell/AppShell";
|
|
|
|
const DataSchemaCanvas = lazy(() =>
|
|
import("ui/modules/data/components/canvas/DataSchemaCanvas").then((m) => ({
|
|
default: m.DataSchemaCanvas,
|
|
})),
|
|
);
|
|
|
|
export function DataSchemaIndex() {
|
|
const { $data } = useBkndData();
|
|
return (
|
|
<>
|
|
<AppShell.SectionHeader
|
|
right={
|
|
<Button type="button" variant="primary" onClick={$data.modals.createAny}>
|
|
Create new
|
|
</Button>
|
|
}
|
|
>
|
|
Schema Overview
|
|
</AppShell.SectionHeader>
|
|
<div className="w-full h-full">
|
|
<Suspense>
|
|
<DataSchemaCanvas />
|
|
</Suspense>
|
|
</div>
|
|
</>
|
|
);
|
|
}
|