diff options
author | ilyayudovin <46264063+ilyayudovin@users.noreply.github.com> | 2020-11-17 15:51:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 15:51:37 +0300 |
commit | bd9a1b7f4222788c784c2c14366e5181da520cf9 (patch) | |
tree | 5227a935584dbbdf68f8be8278a3fdeb7b300734 /src/components/ImageCropAreaSelect/ImageCropAreaSelect.tsx | |
parent | db731f1b88fdfa95f16255767e44762211f47196 (diff) | |
parent | fe82b4e0ef835e6921575f1927174479bea7f777 (diff) | |
download | which-ui-bd9a1b7f4222788c784c2c14366e5181da520cf9.tar.gz |
Merge pull request #109 from which-ecosystem/avatarCrop
fix: clear eslint errors
Diffstat (limited to 'src/components/ImageCropAreaSelect/ImageCropAreaSelect.tsx')
-rw-r--r-- | src/components/ImageCropAreaSelect/ImageCropAreaSelect.tsx | 19 |
1 files changed, 10 insertions, 9 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; |