diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/ImageCropAreaSelect/ImageCropAreaSelect.tsx | 19 | ||||
-rw-r--r-- | src/components/ModalScreen/ModalScreen.tsx | 4 |
2 files changed, 13 insertions, 10 deletions
diff --git a/src/components/ImageCropAreaSelect/ImageCropAreaSelect.tsx b/src/components/ImageCropAreaSelect/ImageCropAreaSelect.tsx index b4540da..07d1534 100644 --- a/src/components/ImageCropAreaSelect/ImageCropAreaSelect.tsx +++ b/src/components/ImageCropAreaSelect/ImageCropAreaSelect.tsx @@ -1,7 +1,7 @@ -import React, {useCallback, useState} from 'react'; +import React, { useCallback, useState } from 'react'; import Cropper from 'react-easy-crop'; -import {makeStyles} from '@material-ui/core/styles'; -import {Slider} from "@material-ui/core"; +import { makeStyles } from '@material-ui/core/styles'; +import { Slider } from '@material-ui/core'; interface Area { x: number; @@ -22,17 +22,18 @@ const useStyles = makeStyles(theme => ({ height: 'calc(100vh - 130px)', background: '#333', [theme.breakpoints.up('sm')]: { - height: 400, + height: 400 } }, sliderContainer: { - padding: 20, + padding: 20 } })); -const ImageCropAreaSelect: React.FC<PropTypes> = ({image, setArea}) => { +const ImageCropAreaSelect: React.FC<PropTypes> = ({ image, setArea }) => { const classes = useStyles(); - const [crop, setCrop] = useState({x: 0, y: 0}); + const [crop, setCrop] = useState({ x: 0, y: 0 }); + // eslint-disable-next-line const [zoom, setZoom] = useState<any>(1); const onCropComplete = useCallback((areaPercentage: Area, areaPixels: Area): void => { @@ -62,11 +63,11 @@ const ImageCropAreaSelect: React.FC<PropTypes> = ({image, setArea}) => { max={3} step={0.01} aria-labelledby="Zoom" - onChange={(e, zoom) => setZoom(zoom)} + onChange={() => setZoom(zoom)} /> </div> </div> - ) + ); }; export default ImageCropAreaSelect; diff --git a/src/components/ModalScreen/ModalScreen.tsx b/src/components/ModalScreen/ModalScreen.tsx index b71c2c8..3d0db34 100644 --- a/src/components/ModalScreen/ModalScreen.tsx +++ b/src/components/ModalScreen/ModalScreen.tsx @@ -42,7 +42,9 @@ const Transition = React.forwardRef(( ref: React.Ref<unknown> ) => <Slide direction="left" ref={ref} {...props} />); -const ModalScreen: React.FC<PropTypes> = ({ title, actionIcon, handleAction, isActionDisabled, handleCloseModal, children }) => { +const ModalScreen: React.FC<PropTypes> = ( + { title, actionIcon, handleAction, isActionDisabled, handleCloseModal, children } +) => { const [isOpen, setIsOpen] = useState<boolean>(true); const classes = useStyles(); const theme = useTheme(); |