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'; interface PropTypes { user: User; info?: string | JSX.Element } const useStyles = makeStyles(theme => ({ root: { display: 'flex', alignItems: 'center' }, verified: { marginLeft: theme.spacing(0.5), width: theme.spacing(2), height: theme.spacing(2) }, avatar: { cursor: 'pointer' } })); const UserStrip: React.FC = ({ user, info }) => { const classes = useStyles(); const history = useHistory(); const { username, avatarUrl, verified } = user; const handleNavigate = () => { history.push(`/profile/${username}`); }; const avatar = ( ); const title = (
{username} {verified && }
); return ; }; export default UserStrip;