From 6212b5ef0e2ae1f2c2334bc003ead1d4fd0b1fe4 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Thu, 25 Jun 2020 14:14:44 +0300
Subject: style: fix linting errors

---
 src/components/PollCard/PollCard.tsx | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

(limited to 'src/components/PollCard')

diff --git a/src/components/PollCard/PollCard.tsx b/src/components/PollCard/PollCard.tsx
index 82d94e9..06d33d5 100644
--- a/src/components/PollCard/PollCard.tsx
+++ b/src/components/PollCard/PollCard.tsx
@@ -1,4 +1,4 @@
-import React, {useState} from 'react';
+import React, { useState } from 'react';
 import { makeStyles } from '@material-ui/core/styles';
 import {
   Card,
@@ -21,7 +21,7 @@ const useStyles = makeStyles(theme => ({
   root: {
     maxWidth: theme.spacing(75),
     height: 488,
-    margin: '40px auto',
+    margin: '40px auto'
   },
   images: {
     height: theme.spacing(50),
@@ -34,7 +34,7 @@ const useStyles = makeStyles(theme => ({
     cursor: 'pointer'
   },
   rateLine: {
-    position:'relative',
+    position: 'relative',
     margin: '0 auto',
     width: '100%',
     height: theme.spacing(2),
@@ -61,12 +61,10 @@ const PollCard: React.FC<PropTypes> = ({ initialPoll, navigate }) => {
     post('votes/', { which, pollId: poll._id }).then(() => {
       poll.contents[which].votes += 1;
       poll.userChoice = which;
-      setPoll({ ...poll});
-    }).catch(error => {
-      console.log(error.response)
+      setPoll({ ...poll });
     });
   };
-  
+
   const handleLeft = () => vote('left');
   const handleRight = () => vote('right');
 
@@ -93,18 +91,18 @@ const PollCard: React.FC<PropTypes> = ({ initialPoll, navigate }) => {
             className={classes.images}
             image={left.url}
           />
-          <PercentageBar value={leftPercentage} which="left" like={userChoice === 'left'}/>
+          <PercentageBar value={leftPercentage} which="left" like={userChoice === 'left'} />
         </CardActionArea>
         <CardActionArea onDoubleClick={handleRight}>
           <CardMedia
             className={classes.images}
             image={right.url}
           />
-          <PercentageBar value={rightPercentage} which="right" like={userChoice === 'right'}/>
+          <PercentageBar value={rightPercentage} which="right" like={userChoice === 'right'} />
         </CardActionArea>
       </div>
       <div className={classes.rateLine}>
-        <div className={classes.fillRateLine} style={{width: `${leftPercentage}%`}} />
+        <div className={classes.fillRateLine} style={{ width: `${leftPercentage}%` }} />
       </div>
     </Card>
   );
-- 
cgit v1.2.3