From e8b66d8fcea497be8b1820cde8ec187383b70c60 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Wed, 12 Aug 2020 03:27:24 +0300
Subject: feat: create basic drawer

---
 src/containers/Profile/MoreMenu.tsx | 72 -------------------------------------
 1 file changed, 72 deletions(-)
 delete mode 100644 src/containers/Profile/MoreMenu.tsx

(limited to 'src/containers/Profile/MoreMenu.tsx')

diff --git a/src/containers/Profile/MoreMenu.tsx b/src/containers/Profile/MoreMenu.tsx
deleted file mode 100644
index 1f41879..0000000
--- a/src/containers/Profile/MoreMenu.tsx
+++ /dev/null
@@ -1,72 +0,0 @@
-import React from 'react';
-import { useHistory } from 'react-router-dom';
-import IconButton from '@material-ui/core/IconButton';
-import Menu from '@material-ui/core/Menu';
-import MenuItem from '@material-ui/core/MenuItem';
-import MoreHorizIcon from '@material-ui/icons/MoreHoriz';
-import { makeStyles } from '@material-ui/core';
-import { useAuth } from '../../hooks/useAuth';
-
-const ITEM_HEIGHT = 48;
-
-const useStyles = makeStyles({
-  moreMenu: {
-    position: 'absolute',
-    right: 10,
-    zIndex: 100
-  }
-});
-
-const MoreMenu: React.FC = () => {
-  const classes = useStyles();
-  const [anchorEl, setAnchorEl] = React.useState<HTMLButtonElement | null>(null);
-  const { logout } = useAuth();
-  const history = useHistory();
-
-  const open = Boolean(anchorEl);
-
-  const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {
-    setAnchorEl(event.currentTarget);
-  };
-
-  const handleLogout = () => {
-    logout();
-    history.push('/login');
-  };
-
-  const handleClose = () => {
-    setAnchorEl(null);
-  };
-
-  return (
-    <div className={classes.moreMenu}>
-      <div>
-        <IconButton
-          aria-label="more"
-          aria-controls="long-menu"
-          aria-haspopup="true"
-          onClick={handleClick}
-        >
-          <MoreHorizIcon />
-        </IconButton>
-        <Menu
-          id="long-menu"
-          anchorEl={anchorEl}
-          keepMounted
-          open={open}
-          onClose={handleClose}
-          PaperProps={{
-            style: {
-              maxHeight: ITEM_HEIGHT * 4.5,
-              width: '20ch'
-            }
-          }}
-        >
-          <MenuItem onClick={handleLogout}>Log out</MenuItem>
-        </Menu>
-      </div>
-    </div>
-  );
-};
-
-export default MoreMenu;
-- 
cgit v1.2.3

