Skip to content

The open alternative to Salesforce, designed for AI.

4809 - disable double signup with mouse click / enter (#4878)

Arturffda4058e0f1
diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx
index 98b12f5eac7..1825542e4d8 100644
--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx
+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx
@@ -71,8 +71,10 @@ export const SignInUpForm = () => {
} else if (signInUpStep === SignInUpStep.Email) {
continueWithCredentials();
} else if (signInUpStep === SignInUpStep.Password) {
- setShowErrors(true);
- form.handleSubmit(submitCredentials)();
+ if (!form.formState.isSubmitting) {
+ setShowErrors(true);
+ form.handleSubmit(submitCredentials)();
+ }
}
}
};
@@ -225,7 +227,7 @@ export const SignInUpForm = () => {
}}
Icon={() => form.formState.isSubmitting && <Loader />}
disabled={
- SignInUpStep.Init
+ signInUpStep === SignInUpStep.Init
? false
: signInUpStep === SignInUpStep.Email
? !form.watch('email')