diff options
author | crupest <crupest@outlook.com> | 2023-09-20 20:16:30 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-09-20 20:16:30 +0800 |
commit | 901fe3d7c032d284da5c9bce24c4aaee9054c7ac (patch) | |
tree | 573cfafd972106d69bef0d41ff5f270ec3c43ec2 /FrontEnd/src/components | |
parent | 4165ca210d9660a67b16089c31b7f65b8b09e019 (diff) | |
download | timeline-901fe3d7c032d284da5c9bce24c4aaee9054c7ac.tar.gz timeline-901fe3d7c032d284da5c9bce24c4aaee9054c7ac.tar.bz2 timeline-901fe3d7c032d284da5c9bce24c4aaee9054c7ac.zip |
Fix lint errors.
Diffstat (limited to 'FrontEnd/src/components')
-rw-r--r-- | FrontEnd/src/components/Spinner.tsx | 2 | ||||
-rw-r--r-- | FrontEnd/src/components/hooks/useAutoUnsubscribePromise.ts (renamed from FrontEnd/src/components/hooks/useAutoUnsubscribePromise.tsx) | 3 | ||||
-rw-r--r-- | FrontEnd/src/components/hooks/useWindowLeave.ts | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/FrontEnd/src/components/Spinner.tsx b/FrontEnd/src/components/Spinner.tsx index 2752a519..50ccf0b2 100644 --- a/FrontEnd/src/components/Spinner.tsx +++ b/FrontEnd/src/components/Spinner.tsx @@ -23,7 +23,7 @@ function calculateSize(size: SpinnerProps["size"]) { } export interface SpinnerProps extends ComponentPropsWithoutRef<"span"> { - size?: "sm" | "md" | "lg" | number | string; + size?: number | string; className?: string; style?: CSSProperties; } diff --git a/FrontEnd/src/components/hooks/useAutoUnsubscribePromise.tsx b/FrontEnd/src/components/hooks/useAutoUnsubscribePromise.ts index 78e21151..01c5a1db 100644 --- a/FrontEnd/src/components/hooks/useAutoUnsubscribePromise.tsx +++ b/FrontEnd/src/components/hooks/useAutoUnsubscribePromise.ts @@ -19,5 +19,6 @@ export default function useAutoUnsubscribePromise<T>( subscribe = false; }; } - }, dependencies); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [promiseGenerator, resultHandler, ...(dependencies ?? [])]); } diff --git a/FrontEnd/src/components/hooks/useWindowLeave.ts b/FrontEnd/src/components/hooks/useWindowLeave.ts index 08777e30..ecd999d4 100644 --- a/FrontEnd/src/components/hooks/useWindowLeave.ts +++ b/FrontEnd/src/components/hooks/useWindowLeave.ts @@ -18,5 +18,5 @@ export default function useWindowLeave( window.onbeforeunload = null; }; } - }, [allow, message]); + }, [c, allow, message]); } |