import { useContext } from "react"; import { Tabs } from "@douyinfe/semi-ui"; import TableOverview from "./TableOverview"; import ReferenceOverview from "./ReferenceOverview"; import AreaOverview from "./AreaOverview"; import { Tab } from "../data/data"; import { LayoutContext, TabContext } from "../pages/Editor"; import NotesOverview from "./NotesOverview"; import Issues from "./Issues"; import TypesOverview from "./TypesOverview"; const SidePanel = (props) => { const { tab, setTab } = useContext(TabContext); const { layout } = useContext(LayoutContext); const tabList = [ { tab: "Tables", itemKey: Tab.tables }, { tab: "Relationships", itemKey: Tab.relationships }, { tab: "Subject Areas", itemKey: Tab.subject_areas }, { tab: "Notes", itemKey: Tab.notes }, { tab: "Types", itemKey: Tab.types }, ]; const contentList = [ , , , , , ]; return (
{ setTab(key); }} collapsible >
{contentList[parseInt(tab) - 1]}
{layout.issues && (
)}
props.setResize(true)} >
); }; export default SidePanel;