🚨 front: Fixing a couple of linter warnings
This commit is contained in:
committed by
ericlinagora
parent
9dc23fdb52
commit
e23c897d66
@@ -8,7 +8,7 @@ import {
|
||||
useRef,
|
||||
} from "react";
|
||||
|
||||
let interval: any = null;
|
||||
let interval: ReturnType<typeof setInterval> | null = null;
|
||||
|
||||
export const AnimatedHeight = memo(
|
||||
(props: { children: ReactNode } & InputHTMLAttributes<HTMLDivElement>) => {
|
||||
@@ -28,7 +28,8 @@ export const AnimatedHeight = memo(
|
||||
updateSize();
|
||||
}, 200);
|
||||
return () => {
|
||||
clearInterval(interval);
|
||||
if (interval)
|
||||
clearInterval(interval);
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ const Template: ComponentStory<any> = (props: { label: string; disabled: boolean
|
||||
<Title className='my-5'>CheckboxSlider</Title>
|
||||
|
||||
<CheckboxSlider
|
||||
onClick={e => setChecked(!checked)}
|
||||
onClick={() => setChecked(!checked)}
|
||||
checked={checked}
|
||||
disabled={props.disabled}
|
||||
/>
|
||||
|
||||
@@ -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<any> = (props: ConfirmModalProps) => {
|
||||
const [open, setOpen] = useState(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user