import * as React from 'react'; import Box from '@mui/material/Box'; import SwipeableDrawer from '@mui/material/SwipeableDrawer'; import Button from '@mui/material/Button'; import List from '@mui/material/List'; import Divider from '@mui/material/Divider'; import ListItem from '@mui/material/ListItem'; import ListItemIcon from '@mui/material/ListItemIcon'; import ListItemText from '@mui/material/ListItemText'; import InboxIcon from '@mui/icons-material/MoveToInbox'; import MailIcon from '@mui/icons-material/Mail'; export default function MobileMenu({nickname}) { const [state, setState] = React.useState(false); const toggleDrawer = (open: boolean) => (event: React.KeyboardEvent | React.MouseEvent) => { if ( event && event.type === 'keydown' && ((event as React.KeyboardEvent).key === 'Tab' || (event as React.KeyboardEvent).key === 'Shift') ) { return; } setState( open ); }; function gotoSettings() { const currentHref = location.href.split('/'); currentHref.pop(); location.href = currentHref.join('/') + '/settings'; } function logout() { const logoutForm: HTMLFormElement = document.getElementById("logout-form") as HTMLFormElement; logoutForm.submit(); } return (