fix: Fix Map page

This commit is contained in:
2025-06-12 22:50:43 +03:00
parent 27cb644242
commit 300ff262ce
41 changed files with 2216 additions and 1055 deletions

View File

@ -9,6 +9,7 @@ import ExpandLessIcon from "@mui/icons-material/ExpandLess";
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
import type { NavigationItem } from "../model";
import { useNavigate, useLocation } from "react-router-dom";
import { Plus } from "lucide-react";
interface NavigationItemProps {
item: NavigationItem;
@ -58,7 +59,7 @@ export const NavigationItemComponent: React.FC<NavigationItemProps> = ({
justifyContent: "center",
},
isNested && {
pl: 4,
pl: open ? 4 : 2.5,
},
isActive && {
backgroundColor: "rgba(0, 0, 0, 0.08)",
@ -84,7 +85,7 @@ export const NavigationItemComponent: React.FC<NavigationItemProps> = ({
},
]}
>
<Icon />
{Icon ? <Icon /> : <Plus />}
</ListItemIcon>
<ListItemText
primary={item.label}
@ -108,7 +109,7 @@ export const NavigationItemComponent: React.FC<NavigationItemProps> = ({
</ListItemButton>
</ListItem>
{item.nestedItems && (
<Collapse in={isExpanded && open} timeout="auto" unmountOnExit>
<Collapse in={isExpanded} timeout="auto" unmountOnExit>
<List component="div" disablePadding>
{item.nestedItems.map((nestedItem) => (
<NavigationItemComponent