import { Collapse, Row, Col, Button } from "@douyinfe/semi-ui"; import { IconPlus } from "@douyinfe/semi-icons"; import { useSelect, useTables } from "../../../hooks"; import { ObjectType } from "../../../data/constants"; import SearchBar from "./SearchBar"; import Empty from "../Empty"; import TableInfo from "./TableInfo"; export default function TablesTab() { const { tables, addTable } = useTables(); const { selectedElement, setSelectedElement } = useSelect(); return ( <> {tables.length === 0 ? ( ) : ( setSelectedElement((prev) => ({ ...prev, open: true, id: parseInt(k), element: ObjectType.TABLE, })) } accordion > {tables.map((t) => (
{t.name}
} itemKey={`${t.id}`} > ))}
)} ); }