Fix login submit (#2849)

pull/2783/head
Leo Giovanetti 2022-05-22 09:28:18 -03:00 committed by GitHub
parent b334586c3b
commit ba9be4e69d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -160,7 +160,10 @@ export default function Login({
<Button
className="flex w-full justify-center"
type="submit"
disabled={form.formState.isSubmitting || (form.formState.isSubmitted && !twoFactorRequired)}>
disabled={
form.formState.isSubmitting ||
(form.formState.isSubmitted && !twoFactorRequired && !errorMessage)
}>
{twoFactorRequired ? t("submit") : t("sign_in")}
</Button>
</div>