From 17af4d25bd4ea7d65fabf60956802918988b1255 Mon Sep 17 00:00:00 2001 From: Mythie Date: Tue, 5 Sep 2023 11:33:49 +1000 Subject: [PATCH] fix: actually make timeouts clear --- apps/web/src/components/forms/signin.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/forms/signin.tsx b/apps/web/src/components/forms/signin.tsx index e88495730..5e44146ea 100644 --- a/apps/web/src/components/forms/signin.tsx +++ b/apps/web/src/components/forms/signin.tsx @@ -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',