get current diagram to export

This commit is contained in:
Guy Ben-Aharon
2024-08-20 21:11:12 +03:00
parent f44c07d2c5
commit 3f76ce4bf2
3 changed files with 30 additions and 3 deletions

View File

@@ -13,6 +13,7 @@ export interface ChartDBContext {
databaseType: DatabaseType;
tables: DBTable[];
relationships: DBRelationship[];
currentDiagram: Diagram;
// General operations
updateDiagramId: (id: string) => Promise<void>;
@@ -123,6 +124,11 @@ export const chartDBContext = createContext<ChartDBContext>({
diagramId: '',
tables: [],
relationships: [],
currentDiagram: {
id: '',
name: '',
databaseType: DatabaseType.GENERIC,
},
// General operations
updateDiagramId: emptyFn,