fix: added logout button
This commit is contained in:
1 parent
384f40a4b4
commit
1851508e01
2 files changed
+28
-29
No files matched your search
@@ -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;
|
||||||
|
|||||||
@@ -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,35 +219,31 @@ function Sidebar() {
|
|||||||
</ListItemButton>
|
</ListItemButton>
|
||||||
))}
|
))}
|
||||||
</List>
|
</List>
|
||||||
<Tooltip
|
|
||||||
title="Open settings"
|
<Stack
|
||||||
slotProps={{
|
direction="row"
|
||||||
popper: {
|
alignItems="center"
|
||||||
modifiers: [
|
py={theme.gap.small}
|
||||||
{
|
px={theme.gap.medium}
|
||||||
name: "offset",
|
pr={0}
|
||||||
options: {
|
gap={theme.gap.xs}
|
||||||
offset: [0, -14],
|
borderRadius={`${theme.shape.borderRadius}px`}
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Stack
|
<Avatar small={true} />
|
||||||
direction="row"
|
<Box ml={theme.gap.xs}>
|
||||||
alignItems="center"
|
<Typography component="span" fontWeight={500}>
|
||||||
py={theme.gap.small}
|
|
||||||
px={theme.gap.medium}
|
|
||||||
gap={theme.gap.xs}
|
|
||||||
borderRadius={`${theme.shape.borderRadius}px`}
|
|
||||||
>
|
|
||||||
<Avatar small={true} />
|
|
||||||
<Typography component="span" ml={theme.gap.xs}>
|
|
||||||
{authState.user?.firstName} {authState.user?.lastName}
|
{authState.user?.firstName} {authState.user?.lastName}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
<Typography sx={{ textTransform: "capitalize" }}>
|
||||||
</Tooltip>
|
{authState.user?.role}
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
<Tooltip title="Log Out">
|
||||||
|
<IconButton sx={{ ml: "auto" }}>
|
||||||
|
<LogoutSvg />
|
||||||
|
</IconButton>
|
||||||
|
</Tooltip>
|
||||||
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user