Skip to content

Commit

Permalink
cleanup route drawer code + rendering #10
Browse files Browse the repository at this point in the history
* remove underline from links
* remove dead code
* remove unused imports
  • Loading branch information
DominikHorn committed Feb 28, 2020
1 parent a1d5099 commit da92d9d
Showing 1 changed file with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import {
} from '@material-ui/core';
import * as React from 'react';
import { Link } from 'react-router-dom';
import { APP_ROUTES, getLinkForRoute, getDisplayNameForRoute } from 'util/routes';
import { APP_ROUTES, getLinkForRoute, getDisplayNameForRoute } from '../../../util/routes';
import h from '../../../util/history';

export interface RouteDrawerProps {
readonly isOpen: boolean;
Expand All @@ -36,22 +37,12 @@ export const RouteDrawer = (props: RouteDrawerProps) => {
<div className={classes.fullList} role={'presentation'} onClick={props.onClose} onKeyDown={props.onClose}>
<List>
{APP_ROUTES.map(route => (
<ListItem button={true} key={getLinkForRoute(route)}>
<ListItem button={true} key={getLinkForRoute(route)} onClick={() => h.push(getLinkForRoute(route))}>
{route.icon && <ListItemIcon>{route.icon}</ListItemIcon>}
<Link to={getLinkForRoute(route)}>
<ListItemText primary={getDisplayNameForRoute(route)} />
</Link>
<ListItemText primary={getDisplayNameForRoute(route)} />
</ListItem>
))}
</List>
{/** TODO: bellow is testing code */}
{/* <Divider />
{['Inbox', 'Starred', 'Send email', 'Drafts'].map((text, index) => (
<ListItem button={true} key={text}>
<ListItemIcon>{index % 2 === 0 ? <InboxIcon /> : <MailIcon />}</ListItemIcon>
<ListItemText primary={text} />
</ListItem>
))} */}
</div>
</SwipeableDrawer>
);
Expand Down

0 comments on commit da92d9d

Please sign in to comment.