Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
Always hide drawer (major)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorge Cuadra committed Sep 21, 2018
1 parent 0189d77 commit 26e0cb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ class Layout extends Component {

<div className="mdc-top-app-bar--dense-fixed-adjust appContent">
<MenuDrawer
isMobile={state.isMobile}
onClose={() => this.setState({ drawerIsOpen: false })}
open={state.drawerIsOpen}
/>
Expand Down
7 changes: 3 additions & 4 deletions src/MenuDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,16 @@ const PATHS = {
sync: '/sync',
};

const MenuDrawer = ({ isMobile, open, onClose, router = {} }) => {
const MenuDrawer = ({ open, onClose, router = {} }) => {
const { pathname = '' } = router;
const contentProps = isMobile ? { onClick: onClose } : {};
return (
<Drawer onClose={onClose} open={open} modal={isMobile}>
<Drawer onClose={onClose} open={open} modal>
<DrawerHeader>
<DrawerTitle theme="primary">{meta.title}</DrawerTitle>
<DrawerSubtitle>{meta.subtitle}</DrawerSubtitle>
</DrawerHeader>

<DrawerContent {...contentProps}>
<DrawerContent onClick={onClose}>
<Link href={PATHS.plan}>
<SimpleListItem
graphic={<Icon icon="list_alt" theme="primary" />}
Expand Down

0 comments on commit 26e0cb2

Please sign in to comment.