diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-25 15:51:51 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-25 15:51:51 +0300 |
commit | f24ea161fd2aef6ba75418c965d444ccbfd53fac (patch) | |
tree | c60f6cc68fa6174272c4f1710630f0a2d6d09cc7 | |
parent | 802b7417c8b16cc8922c0a1526e9b769ca2cc28f (diff) | |
download | which-ui-f24ea161fd2aef6ba75418c965d444ccbfd53fac.tar.gz |
style: fix linting erros
-rw-r--r-- | src/components/PollCard/PollCard.tsx | 4 | ||||
-rw-r--r-- | src/pages/AuthPage/SignUpForm.tsx | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/components/PollCard/PollCard.tsx b/src/components/PollCard/PollCard.tsx index 65b3da1..f82091c 100644 --- a/src/components/PollCard/PollCard.tsx +++ b/src/components/PollCard/PollCard.tsx @@ -41,7 +41,7 @@ const useStyles = makeStyles(theme => ({ transitionDuration: '0.5s' }, highlight: { - backgroundColor: theme.palette.primary.main + ' !important' + backgroundColor: `${theme.palette.primary.main} !important` }, fillRateLine: { height: theme.spacing(2), @@ -72,7 +72,7 @@ const PollCard: React.FC<PropTypes> = ({ initialPoll, navigate }) => { const handleRight = () => vote('right'); const leftPercentage = Math.round(100 * (left.votes / (left.votes + right.votes))); - const rightPercentage = 100 - leftPercentage + const rightPercentage = 100 - leftPercentage; const dominant: Which = left.votes >= right.votes ? 'left' : 'right'; diff --git a/src/pages/AuthPage/SignUpForm.tsx b/src/pages/AuthPage/SignUpForm.tsx index 4a84830..25b79ff 100644 --- a/src/pages/AuthPage/SignUpForm.tsx +++ b/src/pages/AuthPage/SignUpForm.tsx @@ -38,8 +38,7 @@ const SignUpForm: React.FC<PropTypes> = ({ logIn }) => { const email = emailRef.current?.value; if (username && password) { post('/users', { username, password, email }).then(() => { - logIn(username, password).then(success => { - }); + logIn(username, password); }); } else setError(true); }; |