Fix missing hook dependencies and unused imports

This commit is contained in:
Stefano Brilli 2021-01-17 11:39:11 +01:00
parent 40852828f5
commit 6290c34601
3 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ import Box from '@material-ui/core/Box';
import { makeStyles } from '@material-ui/core'; import { makeStyles } from '@material-ui/core';
import { belowDesktop, getSortedTracks, useShallowEqualSelector } from '../utils'; import { belowDesktop, getSortedTracks, useShallowEqualSelector } from '../utils';
import { control } from '../redux/actions'; import { control } from '../redux/actions';
import { shallowEqual, useDispatch } from 'react-redux'; import { useDispatch } from 'react-redux';
import { ReactComponent as MDIcon0 } from '../images/md0.svg'; import { ReactComponent as MDIcon0 } from '../images/md0.svg';
import { ReactComponent as MDIcon1 } from '../images/md1.svg'; import { ReactComponent as MDIcon1 } from '../images/md1.svg';

View File

@ -93,7 +93,7 @@ export const ConvertDialog = (props: { files: File[] }) => {
const handleConvert = useCallback(() => { const handleConvert = useCallback(() => {
handleClose(); handleClose();
dispatch(convertAndUpload(props.files, format, titleSource, titleFormat)); dispatch(convertAndUpload(props.files, format, titleSource, titleFormat));
}, [dispatch, props, format, titleSource, titleFormat]); }, [dispatch, props, format, titleSource, titleFormat, handleClose]);
return ( return (
<Dialog <Dialog

View File

@ -76,7 +76,7 @@ export const TopMenu = function() {
]) ])
); );
handleMenuClose(); handleMenuClose();
}, [dispatch, handleMenuClose]); }, [dispatch, handleMenuClose, discTitle]);
const handleExit = useCallback(() => { const handleExit = useCallback(() => {
dispatch(appActions.setState('WELCOME')); dispatch(appActions.setState('WELCOME'));