import { Collapse } from "@douyinfe/semi-ui"; import { useSelect, useTables } from "../../../hooks"; import Empty from "../Empty"; import SearchBar from "./SearchBar"; import RelationshipInfo from "./RelationshipInfo"; import { ObjectType } from "../../../data/constants"; import { useTranslation } from "react-i18next"; export default function RelationshipsTab() { const { relationships } = useTables(); const { selectedElement, setSelectedElement } = useSelect(); const { t } = useTranslation(); return ( <> setSelectedElement((prev) => ({ ...prev, open: true, id: parseInt(k), element: ObjectType.RELATIONSHIP, })) } accordion > {relationships.length <= 0 ? ( ) : ( relationships.map((r) => ) )} ); }