Refactor SideBar and TopBar components

master
Tudor Stanciu 2024-03-30 13:43:11 +02:00
parent c981660442
commit 0e5b69235c
2 changed files with 1 additions and 31 deletions

View File

@ -112,36 +112,6 @@ const SideBar: React.FC<SideBarProps> = ({ open, onDrawerOpen, onDrawerClose })
</React.Fragment> </React.Fragment>
); );
})} })}
<Divider />
<List>
<MenuItem
open={open}
icon={<SettingsOutlined />}
label={"Settings"}
subMenus={[
{
open,
icon: <DashboardOutlined />,
label: "Dashboards",
onClick: () => navigate("/configurator/dashboards")
},
{
open,
icon: <PollOutlined />,
label: "Charts",
onClick: () => navigate("/configurator/charts")
},
{
open,
icon: <TuneOutlined />,
label: "Filters",
onClick: () => navigate("/configurator/filters")
}
]}
/>
<MenuItem open={open} icon={<HelpOutlineOutlined />} label={"Help"} onClick={() => navigate("/help")} />
</List>
</Drawer> </Drawer>
); );
}; };

View File

@ -58,7 +58,7 @@ const TopBar: React.FC<TopBarProps> = ({ open, onDrawerOpen }) => {
{title} {title}
</Typography> </Typography>
<Box sx={{ flexGrow: 1 }} /> <Box sx={{ flexGrow: 1 }} />
<Box sx={{ display: { xs: "none", md: "flex" } }}> <Box sx={{ display: { xs: "none", md: "flex" }, gap: 1 }}>
<SensitiveInfoToggle /> <SensitiveInfoToggle />
<LightDarkToggle /> <LightDarkToggle />
<ProfileButton /> <ProfileButton />