add router links for menu but the pages dont exit at the moment

This commit is contained in:
Niklas 2025-06-20 17:26:18 +02:00 committed by BlankAccountsUsername
parent b45bb31fec
commit 3b6c47d1a9

View file

@ -7,6 +7,7 @@ import DynamicFeedIcon from '@mui/icons-material/DynamicFeed';
import PersonIcon from '@mui/icons-material/Person';
import InfoIcon from '@mui/icons-material/Info';
import LogoutIcon from '@mui/icons-material/Logout';
import { Link } from "react-router-dom";
// TODO: Dinge so umstrukturieren, dass der State für das offene menü in Header ist und das Menü auch in Header, sodass es mit width 100% die volle breite einnehmen kann
@ -18,7 +19,7 @@ function Header() {
setIsOpen(!isOpen);
};
const iconList = [DynamicFeedIcon, AddAPhotoIcon, PersonIcon, InfoIcon, LogoutIcon];
const routerLinksList = ["/feed","/app","/app","/app","/app"]
const routerLinksList = ["/","/createpost","/profile","/aboutus","/"]
const DrawerList = (
<Box sx={{ width: 250 }} role="presentation" onClick={() => setIsOpen(false)}>
@ -34,7 +35,7 @@ function Header() {
<List sx={{height:'100vh', bgcolor: 'background.paper'}}>
{["Feed", "Create Post", "Profile", "About Us", "Log Out"].map((text, index) => (
<ListItem sx={{height: '10vh'}} key={text} disablePadding>
<ListItemButton sx={{height: '10vh'}} /*component={RouterLink} to={routerLinksList[index]}*/>
<ListItemButton sx={{height: '10vh'}} component={Link} to={routerLinksList[index]} >
<ListItemIcon>
{React.createElement(iconList[index])}
</ListItemIcon>