diff --git a/app/src/components/model/panels/left/LeftPanel.js b/app/src/components/model/panels/left/LeftPanel.js index b3d8eb8c..f458338c 100644 --- a/app/src/components/model/panels/left/LeftPanel.js +++ b/app/src/components/model/panels/left/LeftPanel.js @@ -9,6 +9,7 @@ import { ComponentTab } from "./ComponentTab"; import { DataFlowTab } from "./DataFlowTab"; import { LeftFooter } from "./Footer"; import { SystemTab } from "./SystemTab"; +import { AppBar, Drawer, Grow, Tab, Tabs, Toolbar } from "@mui/material"; const TAB = { SYSTEM: 0, @@ -64,6 +65,9 @@ export function LeftPanel() { return null; } + // This fixes an annoying MUI console error when you deselect a component + const tabHck = !selectedComponent && tab === TAB.COMPONENT ? TAB.SYSTEM : tab; + return ( + + + setTab(v)} + textColor="inherit" + variant="fullWidth" + sx={{ + "& .MuiTabs-indicator": { + backgroundColor: (theme) => theme.palette.common.gramPink, + }, + }} + > + + + {isComponent && ( + + )} + {isDataFlow && ( + + )} + + + + @@ -89,6 +118,7 @@ export function LeftPanel() { {isDataFlow && } + );