diff options
author | eug-vs <eug-vs@keemail.me> | 2020-08-13 17:20:28 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-08-13 17:20:53 +0300 |
commit | c65923480118e90675c81782b9e3bc653e8e3b40 (patch) | |
tree | db3fc58675737eee4eb111e187c7fb5332c4c8ac | |
parent | d60f6d2e73a0c72237e0d807f15e75f14036057f (diff) | |
download | which-ui-c65923480118e90675c81782b9e3bc653e8e3b40.tar.gz |
fix: resolve eslint errors
-rw-r--r-- | src/components/Fab/Fab.tsx | 15 | ||||
-rw-r--r-- | src/containers/Feed/Feed.tsx | 3 |
2 files changed, 5 insertions, 13 deletions
diff --git a/src/components/Fab/Fab.tsx b/src/components/Fab/Fab.tsx index 335fcba..7ca2893 100644 --- a/src/components/Fab/Fab.tsx +++ b/src/components/Fab/Fab.tsx @@ -1,11 +1,6 @@ import React from 'react'; -import { useHistory } from 'react-router-dom' -import { - Fab as FabBase, - useMediaQuery, - Slide, - useScrollTrigger -} from '@material-ui/core/'; +import { useHistory } from 'react-router-dom'; +import { Fab as FabBase, Slide, useScrollTrigger } from '@material-ui/core/'; import { makeStyles } from '@material-ui/core/styles'; import PlusIcon from '@material-ui/icons/Add'; @@ -15,7 +10,7 @@ interface PropTypes { const useStyles = makeStyles(theme => ({ root: { - zIndex: 1200, + zIndex: 1000, position: 'fixed', [theme.breakpoints.down('sm')]: { @@ -29,7 +24,7 @@ const useStyles = makeStyles(theme => ({ } })); -const Fab: React.FC<PropTypes> = ({ hideOnScroll=false }) => { +const Fab: React.FC<PropTypes> = ({ hideOnScroll = false }) => { const classes = useStyles(); const history = useHistory(); const trigger = useScrollTrigger(); @@ -40,7 +35,7 @@ const Fab: React.FC<PropTypes> = ({ hideOnScroll=false }) => { return ( <Slide appear={false} direction="up" in={(!hideOnScroll) || !trigger}> - <FabBase + <FabBase onClick={handleClick} className={classes.root} color="secondary" diff --git a/src/containers/Feed/Feed.tsx b/src/containers/Feed/Feed.tsx index ad306da..10b1adc 100644 --- a/src/containers/Feed/Feed.tsx +++ b/src/containers/Feed/Feed.tsx @@ -1,6 +1,4 @@ import React from 'react'; -import { useHistory } from 'react-router-dom' -import { Poll } from 'which-types'; import { Container } from '@material-ui/core/'; import PollsList from '../../components/PollsList/PollsList'; @@ -10,7 +8,6 @@ import { useFeed } from '../../hooks/APIClient'; const Feed: React.FC = () => { - const classes = useStyles(); const { data: polls, mutate } = useFeed(); const { isAuthenticated } = useAuth(); |