resolve issues with new features
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user