From 75c1dac4bceddab1d94b9e43c2fb2035297eb6bd Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Wed, 1 Jul 2020 14:38:39 +0300
Subject: fix eslint errors

---
 src/pages/FeedPage/PollSubmission.tsx | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

(limited to 'src/pages/FeedPage/PollSubmission.tsx')

diff --git a/src/pages/FeedPage/PollSubmission.tsx b/src/pages/FeedPage/PollSubmission.tsx
index f8ba26b..3088279 100644
--- a/src/pages/FeedPage/PollSubmission.tsx
+++ b/src/pages/FeedPage/PollSubmission.tsx
@@ -8,12 +8,12 @@ import {
   Divider
 } from '@material-ui/core';
 import { Poll, Which } from 'which-types';
+import { useSnackbar } from 'notistack';
 import PollSubmissionImage from './PollSubmissionImage';
 import UserStrip from '../../components/UserStrip/UserStrip';
 import { post } from '../../requests';
 import { Contents } from './types';
 import { useAuth } from '../../hooks/useAuth';
-import {useSnackbar} from "notistack";
 
 interface PropTypes{
   addPoll: (poll: Poll) => void;
@@ -35,7 +35,7 @@ const PollSubmission: React.FC<PropTypes> = ({ addPoll }) => {
   const classes = useStyles();
   const [expanded, setExpanded] = useState(false);
   const [contents, setContents] = useState<Contents>(emptyContents);
-  const { enqueueSnackbar, closeSnackbar } = useSnackbar();
+  const { enqueueSnackbar } = useSnackbar();
   const { user } = useAuth();
 
   const readyToSubmit = contents.left.url && contents.right.url;
@@ -48,6 +48,13 @@ const PollSubmission: React.FC<PropTypes> = ({ addPoll }) => {
     setExpanded(false);
   };
 
+  const showSnackBar = (message: string) => {
+    enqueueSnackbar(message, {
+      variant: 'success'
+    });
+  };
+
+
   const handleClick = () => {
     if (expanded && readyToSubmit) {
       post('/polls/', { contents }).then(response => {
@@ -59,12 +66,6 @@ const PollSubmission: React.FC<PropTypes> = ({ addPoll }) => {
     setExpanded(!expanded);
   };
 
-  const showSnackBar = (message: string) => {
-    enqueueSnackbar(message, {
-      variant: 'success',
-    });
-  };
-
   return (
     <ClickAwayListener onClickAway={handleClickAway}>
       <Card>
-- 
cgit v1.2.3

