1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-08 23:15:24 +02:00

Disable button on submit

This commit is contained in:
Aditya Gannavarapu 2024-01-20 03:27:58 +05:30
parent f1e0b84e60
commit f902c5ccd5

View file

@ -28,6 +28,7 @@ export default function LoginPage() {
setErrorMessage(null) setErrorMessage(null)
setPassword('') setPassword('')
setIsLoading(true) setIsLoading(true)
setIsValid(false)
const response = await signIn('credentials', { const response = await signIn('credentials', {
email, email,
@ -38,6 +39,7 @@ export default function LoginPage() {
if (response && response.error) { if (response && response.error) {
setErrorMessage(response.error) setErrorMessage(response.error)
setIsLoading(false) setIsLoading(false)
setIsValid(true)
} }
} }