From 80a09a9ec176c7585dca9d81f6b3d690660ce633 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 8 Oct 2020 13:56:28 +0300 Subject: style: fix eslint errors --- .eslintrc.json | 3 ++- src/components/ModalScreen/ModalScreen.tsx | 12 +++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 479e04f..1102af4 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -25,6 +25,7 @@ "react/prop-types": 0, "react/no-children-prop": 0, "react/no-danger": 0, - "react/jsx-one-expression-per-line": 0 + "react/jsx-one-expression-per-line": 0, + "react/jsx-props-no-spreading": 0 } } diff --git a/src/components/ModalScreen/ModalScreen.tsx b/src/components/ModalScreen/ModalScreen.tsx index 4a4b1be..81e5c5a 100644 --- a/src/components/ModalScreen/ModalScreen.tsx +++ b/src/components/ModalScreen/ModalScreen.tsx @@ -32,12 +32,10 @@ const useStyles = makeStyles(theme => ({ } })); -const Transition = React.forwardRef(function Transition( - props: TransitionProps & { children?: React.ReactElement }, - ref: React.Ref, -) { - return ; -}); +const Transition = React.forwardRef(( + props: TransitionProps & { children?: React.ReactElement }, + ref: React.Ref +) => ); const ModalScreen: React.FC = ({ title, children }) => { const [isOpen, setIsOpen] = useState(true); @@ -47,7 +45,7 @@ const ModalScreen: React.FC = ({ title, children }) => { const history = useHistory(); const handleClose = useCallback(() => setIsOpen(false), [setIsOpen]); - const onExited = useCallback(() => history.goBack(), [history]) + const onExited = useCallback(() => history.goBack(), [history]); return (