resolve issues with new features

This commit is contained in:
Matthias Hochmeister
2026-03-12 10:21:26 +01:00
parent 31f1414e06
commit d5be68ca63
13 changed files with 275 additions and 86 deletions

View File

@@ -20,8 +20,7 @@ import {
CalendarMonth,
MenuBook,
AdminPanelSettings,
ChevronLeft,
ChevronRight,
Menu as MenuIcon,
} from '@mui/icons-material';
import { useNavigate, useLocation } from 'react-router-dom';
import { useLayout, DRAWER_WIDTH, DRAWER_WIDTH_COLLAPSED } from '../../contexts/LayoutContext';
@@ -104,6 +103,11 @@ function Sidebar({ mobileOpen, onMobileClose }: SidebarProps) {
const drawerContent = (
<Box sx={{ display: 'flex', flexDirection: 'column', height: '100%' }}>
<Toolbar />
<Box sx={{ display: 'flex', justifyContent: sidebarCollapsed ? 'center' : 'flex-end', px: 1, py: 0.5 }}>
<IconButton onClick={toggleSidebar} aria-label="Sidebar umschalten">
<MenuIcon />
</IconButton>
</Box>
<List sx={{ flex: 1 }}>
{navigationItems.map((item) => {
const isActive = location.pathname === item.path;
@@ -154,11 +158,6 @@ function Sidebar({ mobileOpen, onMobileClose }: SidebarProps) {
);
})}
</List>
<Box sx={{ display: 'flex', justifyContent: 'center', mb: 1 }}>
<IconButton onClick={toggleSidebar} aria-label="Sidebar umschalten">
{sidebarCollapsed ? <ChevronRight /> : <ChevronLeft />}
</IconButton>
</Box>
</Box>
);