import Link from 'next/link'; import Drawer from '@mui/material/Drawer'; import Box from '@mui/material/Box'; import {useTheme} from '@mui/material/styles'; import {useTranslation} from 'react-i18next'; import {useRouter} from 'next/router'; import useProfile from '../../hooks/useProfile'; import DrawerMenuItem from './DrawerMenuItem'; interface Props { eventUuid: string; } const DrawerMenu = ({eventUuid}: Props) => { const {t} = useTranslation(); const theme = useTheme(); const {connected} = useProfile(); const appLink = connected ? '/dashboard' : `/e/${eventUuid}` || ''; const router = useRouter(); const { query: {uuid}, } = router; return ( Logo { router.push(`/e/${uuid}`, null, {shallow: true}); }} icon="directions_car" active={router.pathname === `/e/[uuid]`} /> { router.push(`/e/${uuid}/waitingList`, null, {shallow: true}); }} icon="group" active={router.pathname === `/e/[uuid]/waitingList` || router.pathname === `/e/[uuid]/assign/[passengerId]`} /> { router.push(`/e/${uuid}/details`, null, {shallow: true}); }} icon="info" active={router.pathname === `/e/[uuid]/details`} /> ); }; export default DrawerMenu;