mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 12:56:05 +00:00
public commit
This commit is contained in:
41
app/src/ui/routes/data/data.schema.index.tsx
Normal file
41
app/src/ui/routes/data/data.schema.index.tsx
Normal file
@@ -0,0 +1,41 @@
|
||||
import { Suspense, lazy, useRef } from "react";
|
||||
import {
|
||||
CreateModal,
|
||||
type CreateModalRef
|
||||
} from "ui/modules/data/components/schema/create-modal/CreateModal";
|
||||
import { Button } from "../../components/buttons/Button";
|
||||
import * as AppShell from "../../layouts/AppShell/AppShell";
|
||||
|
||||
const DataSchemaCanvas = lazy(() =>
|
||||
import("ui/modules/data/components/canvas/DataSchemaCanvas").then((m) => ({
|
||||
default: m.DataSchemaCanvas
|
||||
}))
|
||||
);
|
||||
|
||||
export function DataSchemaIndex() {
|
||||
const createModalRef = useRef<CreateModalRef>(null);
|
||||
|
||||
return (
|
||||
<>
|
||||
<CreateModal ref={createModalRef} />
|
||||
<AppShell.SectionHeader
|
||||
right={
|
||||
<Button
|
||||
type="button"
|
||||
variant="primary"
|
||||
onClick={() => createModalRef.current?.open()}
|
||||
>
|
||||
Create new
|
||||
</Button>
|
||||
}
|
||||
>
|
||||
Schema Overview
|
||||
</AppShell.SectionHeader>
|
||||
<div className="w-full h-full">
|
||||
<Suspense>
|
||||
<DataSchemaCanvas />
|
||||
</Suspense>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user