From f902c5ccd548f6f058595066565deddd1c97fed8 Mon Sep 17 00:00:00 2001 From: Aditya Gannavarapu Date: Sat, 20 Jan 2024 03:27:58 +0530 Subject: [PATCH] Disable button on submit --- apps/client/pages/login.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/client/pages/login.tsx b/apps/client/pages/login.tsx index 57cbfa70..f0f771c4 100644 --- a/apps/client/pages/login.tsx +++ b/apps/client/pages/login.tsx @@ -28,6 +28,7 @@ export default function LoginPage() { setErrorMessage(null) setPassword('') setIsLoading(true) + setIsValid(false) const response = await signIn('credentials', { email, @@ -38,6 +39,7 @@ export default function LoginPage() { if (response && response.error) { setErrorMessage(response.error) setIsLoading(false) + setIsValid(true) } }