fix: actually make timeouts clear

This commit is contained in:
Mythie
2023-09-05 11:33:49 +10:00
parent 6e095921e6
commit 17af4d25bd

View File

@ -55,10 +55,10 @@ export const SignInForm = ({ className }: SignInFormProps) => {
const errorCode = searchParams?.get('error');
useEffect(() => {
const timeout: NodeJS.Timeout | null = null;
let timeout: NodeJS.Timeout | null = null;
if (isErrorCode(errorCode)) {
setTimeout(() => {
timeout = setTimeout(() => {
toast({
variant: 'destructive',
description: ErrorMessages[errorCode] ?? 'An unknown error occurred',