diff options
Diffstat (limited to 'src/components/UserStrip/UserStrip.tsx')
-rw-r--r-- | src/components/UserStrip/UserStrip.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/components/UserStrip/UserStrip.tsx b/src/components/UserStrip/UserStrip.tsx index 3ac47b3..a2d2700 100644 --- a/src/components/UserStrip/UserStrip.tsx +++ b/src/components/UserStrip/UserStrip.tsx @@ -1,10 +1,11 @@ import React from 'react'; +import { useHistory } from 'react-router-dom'; import { makeStyles } from '@material-ui/core/styles'; import VerifiedIcon from '@material-ui/icons/CheckCircleOutline'; import { Avatar, CardHeader } from '@material-ui/core/'; import { User } from 'which-types'; -import { useNavigate } from '../../hooks/useNavigate'; +import urls from '../../pages/urls'; interface PropTypes { user: User; @@ -30,11 +31,11 @@ const useStyles = makeStyles(theme => ({ const UserStrip: React.FC<PropTypes> = ({ user, info }) => { const classes = useStyles(); - const { navigate } = useNavigate(); + const history = useHistory(); const { username, avatarUrl, verified } = user; const handleNavigate = () => { - navigate('profile', user._id); + history.push(urls.profile(user.username)); }; const avatar = ( |