frontend/containers/DrawerMenu/index.tsx (view raw)
1import Drawer from '@material-ui/core/Drawer';
2import Icon from '@material-ui/core/Icon';
3import {useTranslation} from 'react-i18next';
4import { useRouter } from 'next/router';
5import DrawerMenuItem from './DrawerMenuItem';
6import useStyles from './styles';
7import useBannerStore from '../../stores/useBannerStore';
8
9const DrawerMenu = () => {
10 const {t} = useTranslation();
11 const bannerOffset = useBannerStore(s => s.offset)
12 const classes = useStyles({bannerOffset});
13 const {query: {uuid}} = useRouter();
14
15 return (
16 <Drawer variant="permanent" className={classes.drawer}>
17 <DrawerMenuItem
18 title={t('drawer.travels')}
19 href={`/e/${uuid}`}
20 Icon={
21 <Icon>directions_car</Icon>
22 }
23 />
24 <DrawerMenuItem
25 title={t('drawer.waitingList')}
26 href={`/e/${uuid}`}
27 Icon={
28 <Icon>group</Icon>
29 }
30 />
31 <DrawerMenuItem
32 title={t('drawer.information')}
33 href={`/e/${uuid}`}
34 Icon={
35 <Icon>info</Icon>
36 }
37 />
38 </Drawer>
39 );
40};
41
42export default DrawerMenu;