fix: added logout button

This commit is contained in:
Daniel Cojocea committed 2024-08-16 12:53:41 -04:00
1 parent 384f40a4b4
commit 1851508e01
2 files changed
+19 -20

No files matched your search

+5 -1
View File
@@ -23,9 +23,13 @@ aside .MuiListSubheader-root {
opacity: 0.6; opacity: 0.6;
} }
aside span.MuiTypography-root, aside span.MuiTypography-root,
aside p.MuiTypography-root,
aside .MuiListSubheader-root { aside .MuiListSubheader-root {
color: var(--env-var-color-5); color: var(--env-var-color-5);
} }
aside p.MuiTypography-root {
font-size: var(--env-var-font-size-small);
}
aside .MuiListItemButton-root:not(.selected-path) > * { aside .MuiListItemButton-root:not(.selected-path) > * {
opacity: 0.9; opacity: 0.9;
} }
@@ -33,7 +37,7 @@ aside .selected-path > * {
opacity: 1; opacity: 1;
} }
aside .selected-path span.MuiTypography-root { aside .selected-path span.MuiTypography-root {
font-weight: 500; font-weight: 600;
} }
aside .MuiStack-root:last-child { aside .MuiStack-root:last-child {
margin-top: auto; margin-top: auto;
+14 -19
View File
@@ -2,6 +2,7 @@ import React, { useState } from "react";
import { import {
Box, Box,
Collapse, Collapse,
IconButton,
List, List,
ListItemButton, ListItemButton,
ListItemIcon, ListItemIcon,
@@ -106,7 +107,6 @@ function Sidebar() {
Menu Menu
</ListSubheader> </ListSubheader>
} }
sx={{ width: "100%" }}
> >
{menu.map((item) => {menu.map((item) =>
item.path ? ( item.path ? (
@@ -193,7 +193,6 @@ function Sidebar() {
Other Other
</ListSubheader> </ListSubheader>
} }
sx={{ width: "100%" }}
> >
{other.map((item) => ( {other.map((item) => (
<ListItemButton <ListItemButton
@@ -220,36 +219,32 @@ function Sidebar() {
</ListItemButton> </ListItemButton>
))} ))}
</List> </List>
<Tooltip
title="Open settings"
slotProps={{
popper: {
modifiers: [
{
name: "offset",
options: {
offset: [0, -14],
},
},
],
},
}}
>
<Stack <Stack
direction="row" direction="row"
alignItems="center" alignItems="center"
py={theme.gap.small} py={theme.gap.small}
px={theme.gap.medium} px={theme.gap.medium}
pr={0}
gap={theme.gap.xs} gap={theme.gap.xs}
borderRadius={`${theme.shape.borderRadius}px`} borderRadius={`${theme.shape.borderRadius}px`}
> >
<Avatar small={true} /> <Avatar small={true} />
<Typography component="span" ml={theme.gap.xs}> <Box ml={theme.gap.xs}>
<Typography component="span" fontWeight={500}>
{authState.user?.firstName} {authState.user?.lastName} {authState.user?.firstName} {authState.user?.lastName}
</Typography> </Typography>
</Stack> <Typography sx={{ textTransform: "capitalize" }}>
{authState.user?.role}
</Typography>
</Box>
<Tooltip title="Log Out">
<IconButton sx={{ ml: "auto" }}>
<LogoutSvg />
</IconButton>
</Tooltip> </Tooltip>
</Stack> </Stack>
</Stack>
); );
} }