modified: frontend/src/pages/DatabaseSchema.tsx

This commit is contained in:
2026-01-27 23:44:33 +03:00
parent 21b4d8e22b
commit d8dffb5ee1

View File

@@ -1,4 +1,4 @@
import { useState, useCallback, useMemo } from 'react';
import { useState, useMemo } from 'react';
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
import {
ReactFlow,
@@ -17,7 +17,7 @@ import { databasesApi, schemaApi, TableInfo, SchemaData } from '@/services/api';
import { Database } from '@/types';
// Custom node for table
function TableNode({ data }: { data: TableInfo }) {
function TableNode({ data }: { data: TableInfo & Record<string, unknown> }) {
return (
<div className="bg-white border-2 border-gray-300 rounded-lg shadow-lg min-w-64 overflow-hidden">
{/* Table header */}
@@ -89,7 +89,7 @@ function generateNodesAndEdges(schema: SchemaData): { nodes: Node[]; edges: Edge
id: fullName,
type: 'table',
position: { x, y },
data: table,
data: { ...table } as TableInfo & Record<string, unknown>,
});
});