Merge pull request #1781 from bluewave-labs/fix/fe/sidebar-selection
fix: sidebar selection
This commit is contained in:
1 file changed
+12
-7
@@ -183,7 +183,7 @@ function Sidebar() {
|
||||
This is the top lever for styles
|
||||
*/
|
||||
sx={{
|
||||
position: 'relative',
|
||||
position: "relative",
|
||||
border: 1,
|
||||
borderColor: theme.palette.primary.lowContrast,
|
||||
borderRadius: theme.shape.borderRadius,
|
||||
@@ -306,12 +306,12 @@ function Sidebar() {
|
||||
<Box
|
||||
sx={{
|
||||
flexGrow: 1,
|
||||
overflow: 'auto',
|
||||
overflowX: 'hidden',
|
||||
'&::-webkit-scrollbar': {
|
||||
overflow: "auto",
|
||||
overflowX: "hidden",
|
||||
"&::-webkit-scrollbar": {
|
||||
width: theme.spacing(2),
|
||||
},
|
||||
'&::-webkit-scrollbar-thumb': {
|
||||
"&::-webkit-scrollbar-thumb": {
|
||||
backgroundColor: theme.palette.primary.lowContrast,
|
||||
borderRadius: theme.spacing(4),
|
||||
},
|
||||
@@ -343,7 +343,10 @@ function Sidebar() {
|
||||
}}
|
||||
>
|
||||
{menu.map((item) => {
|
||||
if (item.path === "distributed-uptime" && distributedUptimeEnabled === false) {
|
||||
if (
|
||||
item.path === "distributed-uptime" &&
|
||||
distributedUptimeEnabled === false
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
return item.path ? (
|
||||
@@ -367,7 +370,9 @@ function Sidebar() {
|
||||
disableInteractive
|
||||
>
|
||||
<ListItemButton
|
||||
className={location.pathname === `/${item.path}` ? "selected-path" : ""}
|
||||
className={
|
||||
location.pathname.startsWith(`/${item.path}`) ? "selected-path" : ""
|
||||
}
|
||||
onClick={() => navigate(`/${item.path}`)}
|
||||
sx={{
|
||||
height: "37px",
|
||||
|
||||
Reference in new issue
Block a user