diff options
author | Eugene Sokolov <eug-vs@keemail.me> | 2020-08-08 11:28:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-08 11:28:07 +0300 |
commit | 70d533d2bcbaa689d3de6ecb532997cd68a7a842 (patch) | |
tree | 0199ab8a91f3e1bd5df0865c10695dde20a5303f /src/pages/ProfilePage/MoreMenu.tsx | |
parent | 84eaed2f29ac370eea7c4a7ded6fb3d4661c9679 (diff) | |
parent | 104c658fc411536e09931191721411de448f964f (diff) | |
download | which-ui-70d533d2bcbaa689d3de6ecb532997cd68a7a842.tar.gz |
Merge pull request #72 from which-ecosystem/feat/routing
Add basic routing
Diffstat (limited to 'src/pages/ProfilePage/MoreMenu.tsx')
-rw-r--r-- | src/pages/ProfilePage/MoreMenu.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pages/ProfilePage/MoreMenu.tsx b/src/pages/ProfilePage/MoreMenu.tsx index 4e681f5..1f41879 100644 --- a/src/pages/ProfilePage/MoreMenu.tsx +++ b/src/pages/ProfilePage/MoreMenu.tsx @@ -1,11 +1,11 @@ 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'; -import { useNavigate } from '../../hooks/useNavigate'; const ITEM_HEIGHT = 48; @@ -21,7 +21,7 @@ const MoreMenu: React.FC = () => { const classes = useStyles(); const [anchorEl, setAnchorEl] = React.useState<HTMLButtonElement | null>(null); const { logout } = useAuth(); - const { navigate } = useNavigate(); + const history = useHistory(); const open = Boolean(anchorEl); @@ -31,7 +31,7 @@ const MoreMenu: React.FC = () => { const handleLogout = () => { logout(); - navigate('auth'); + history.push('/login'); }; const handleClose = () => { |