mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-06 15:18:48 +00:00
add router links for menu but the pages dont exit at the moment
This commit is contained in:
parent
b45bb31fec
commit
3b6c47d1a9
1 changed files with 3 additions and 2 deletions
|
@ -7,6 +7,7 @@ import DynamicFeedIcon from '@mui/icons-material/DynamicFeed';
|
||||||
import PersonIcon from '@mui/icons-material/Person';
|
import PersonIcon from '@mui/icons-material/Person';
|
||||||
import InfoIcon from '@mui/icons-material/Info';
|
import InfoIcon from '@mui/icons-material/Info';
|
||||||
import LogoutIcon from '@mui/icons-material/Logout';
|
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
|
// 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);
|
setIsOpen(!isOpen);
|
||||||
};
|
};
|
||||||
const iconList = [DynamicFeedIcon, AddAPhotoIcon, PersonIcon, InfoIcon, LogoutIcon];
|
const iconList = [DynamicFeedIcon, AddAPhotoIcon, PersonIcon, InfoIcon, LogoutIcon];
|
||||||
const routerLinksList = ["/feed","/app","/app","/app","/app"]
|
const routerLinksList = ["/","/createpost","/profile","/aboutus","/"]
|
||||||
|
|
||||||
const DrawerList = (
|
const DrawerList = (
|
||||||
<Box sx={{ width: 250 }} role="presentation" onClick={() => setIsOpen(false)}>
|
<Box sx={{ width: 250 }} role="presentation" onClick={() => setIsOpen(false)}>
|
||||||
|
@ -34,7 +35,7 @@ function Header() {
|
||||||
<List sx={{height:'100vh', bgcolor: 'background.paper'}}>
|
<List sx={{height:'100vh', bgcolor: 'background.paper'}}>
|
||||||
{["Feed", "Create Post", "Profile", "About Us", "Log Out"].map((text, index) => (
|
{["Feed", "Create Post", "Profile", "About Us", "Log Out"].map((text, index) => (
|
||||||
<ListItem sx={{height: '10vh'}} key={text} disablePadding>
|
<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>
|
<ListItemIcon>
|
||||||
{React.createElement(iconList[index])}
|
{React.createElement(iconList[index])}
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue