diff options
author | eug-vs <eug-vs@keemail.me> | 2020-07-04 00:08:57 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-07-04 00:08:57 +0300 |
commit | b52743cc950e9633a2da41f72d3462286c629967 (patch) | |
tree | baeeb9c1b9111778e8c044c4675803b0a8f29347 | |
parent | 2a83b58e40d60dc058f385440a3125c60fb90026 (diff) | |
download | which-ui-b52743cc950e9633a2da41f72d3462286c629967.tar.gz |
style: remove eslint errors
-rw-r--r-- | src/components/Header/Header.tsx | 3 | ||||
-rw-r--r-- | src/components/PollCard/PollCard.tsx | 2 | ||||
-rw-r--r-- | src/components/ScrollTopArrow/ScrollTopArrow.tsx | 9 | ||||
-rw-r--r-- | src/pages/FeedPage/PollSubmission.tsx | 2 |
4 files changed, 10 insertions, 6 deletions
diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index bf831d4..41aeec7 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -78,7 +78,8 @@ const Header: React.FC = () => { const ProfileButton = ( <IconButton onClick={handleProfile}> - { user?.avatarUrl + { + user?.avatarUrl ? <Avatar className={classes.round} src={user?.avatarUrl} /> : <AccountCircle /> } diff --git a/src/components/PollCard/PollCard.tsx b/src/components/PollCard/PollCard.tsx index ca85d11..98ae001 100644 --- a/src/components/PollCard/PollCard.tsx +++ b/src/components/PollCard/PollCard.tsx @@ -27,7 +27,7 @@ const DATE_FORMAT = { const useStyles = makeStyles(theme => ({ images: { - height: theme.spacing(50), + height: theme.spacing(50) }, imagesBlock: { display: 'flex' diff --git a/src/components/ScrollTopArrow/ScrollTopArrow.tsx b/src/components/ScrollTopArrow/ScrollTopArrow.tsx index dfa573f..08b8591 100644 --- a/src/components/ScrollTopArrow/ScrollTopArrow.tsx +++ b/src/components/ScrollTopArrow/ScrollTopArrow.tsx @@ -27,7 +27,7 @@ const ScrollTopArrow: React.FC = () => { const [showScroll, setShowScroll] = useState(false); const theme = useTheme(); const classes = useStyles(); - const isMobile = useMediaQuery(theme.breakpoints.down("sm")); + const isMobile = useMediaQuery(theme.breakpoints.down('sm')); const checkScrollTop = () => { if (!showScroll && window.pageYOffset > 400) { @@ -45,8 +45,11 @@ const ScrollTopArrow: React.FC = () => { return ( <div className={classes.root}> - {showScroll && !isMobile && - <ArrowUpwardIcon className={classes.icon} color="primary" onClick={scrollTop} />} + { + showScroll + && !isMobile + && <ArrowUpwardIcon className={classes.icon} color="primary" onClick={scrollTop} /> + } </div> ); }; diff --git a/src/pages/FeedPage/PollSubmission.tsx b/src/pages/FeedPage/PollSubmission.tsx index 5c8efbb..347eecc 100644 --- a/src/pages/FeedPage/PollSubmission.tsx +++ b/src/pages/FeedPage/PollSubmission.tsx @@ -25,7 +25,7 @@ const useStyles = makeStyles(theme => ({ }, images: { height: theme.spacing(50), - display: 'flex', + display: 'flex' } })); |