From 1ad4b552361e7753d164fa8ffe9f5ae132221fed Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 27 Jun 2020 02:14:41 +0300 Subject: feat: add verified mark in new UserStrip comp --- src/components/PollCard/PollCard.tsx | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'src/components/PollCard') diff --git a/src/components/PollCard/PollCard.tsx b/src/components/PollCard/PollCard.tsx index 72c2daf..d3b4fc2 100644 --- a/src/components/PollCard/PollCard.tsx +++ b/src/components/PollCard/PollCard.tsx @@ -3,13 +3,12 @@ import { makeStyles } from '@material-ui/core/styles'; import { Card, CardActionArea, - CardMedia, - Avatar, - CardHeader + CardMedia } from '@material-ui/core/'; import { Which, Poll } from 'which-types'; import PercentageBar from './PercentageBar'; +import UserStrip from '../UserStrip/UserStrip'; import { post } from '../../requests'; interface PropTypes { @@ -38,9 +37,6 @@ const useStyles = makeStyles(theme => ({ imagesBlock: { display: 'flex' }, - avatar: { - cursor: 'pointer' - }, rateLine: { position: 'relative', width: '100%', @@ -64,10 +60,6 @@ const PollCard: React.FC = ({ initialPoll, navigate }) => { const { author, contents: { left, right }, userChoice } = poll; const date: string = new Date(poll.createdAt).toLocaleString('default', DATE_FORMAT); - const handleNavigate = () => { - navigate('profile', poll.author._id); - }; - const vote = (which: Which) => { if (userChoice) return; post('votes/', { which, pollId: poll._id }).then(() => { @@ -87,19 +79,7 @@ const PollCard: React.FC = ({ initialPoll, navigate }) => { return ( - - )} - title={author.username} - subheader={date} - /> +