From e23c897d664d82da2849b207d4c936dca254e4b6 Mon Sep 17 00:00:00 2001 From: Eric Doughty-Papassideris Date: Mon, 11 Nov 2024 00:52:15 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20front:=20Fixing=20a=20couple=20o?= =?UTF-8?q?f=20linter=20warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tdrive/frontend/src/app/atoms/animated-height/index.tsx | 5 +++-- .../src/app/atoms/input/stories/checkbox.stories.tsx | 2 +- tdrive/frontend/src/app/atoms/modal/confirm.stories.tsx | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tdrive/frontend/src/app/atoms/animated-height/index.tsx b/tdrive/frontend/src/app/atoms/animated-height/index.tsx index fe553783..de2324f7 100644 --- a/tdrive/frontend/src/app/atoms/animated-height/index.tsx +++ b/tdrive/frontend/src/app/atoms/animated-height/index.tsx @@ -8,7 +8,7 @@ import { useRef, } from "react"; -let interval: any = null; +let interval: ReturnType | null = null; export const AnimatedHeight = memo( (props: { children: ReactNode } & InputHTMLAttributes) => { @@ -28,7 +28,8 @@ export const AnimatedHeight = memo( updateSize(); }, 200); return () => { - clearInterval(interval); + if (interval) + clearInterval(interval); }; }, []); diff --git a/tdrive/frontend/src/app/atoms/input/stories/checkbox.stories.tsx b/tdrive/frontend/src/app/atoms/input/stories/checkbox.stories.tsx index 262f8435..4ee9fcca 100644 --- a/tdrive/frontend/src/app/atoms/input/stories/checkbox.stories.tsx +++ b/tdrive/frontend/src/app/atoms/input/stories/checkbox.stories.tsx @@ -36,7 +36,7 @@ const Template: ComponentStory = (props: { label: string; disabled: boolean CheckboxSlider setChecked(!checked)} + onClick={() => setChecked(!checked)} checked={checked} disabled={props.disabled} /> diff --git a/tdrive/frontend/src/app/atoms/modal/confirm.stories.tsx b/tdrive/frontend/src/app/atoms/modal/confirm.stories.tsx index 4e0d5dd2..bad0dc51 100644 --- a/tdrive/frontend/src/app/atoms/modal/confirm.stories.tsx +++ b/tdrive/frontend/src/app/atoms/modal/confirm.stories.tsx @@ -4,7 +4,6 @@ import { action } from '@storybook/addon-actions'; import { RecoilRoot } from 'recoil'; import { ComponentStory } from '@storybook/react'; import { CheckCircleIcon, ExclamationCircleIcon } from '@heroicons/react/outline'; -import { Title } from '../text'; import { ConfirmModal, ConfirmModalProps } from './confirm'; const icons = { @@ -36,6 +35,7 @@ export default { } }; +// eslint-disable-next-line @typescript-eslint/no-explicit-any const Template: ComponentStory = (props: ConfirmModalProps) => { const [open, setOpen] = useState(true);