diff --git a/apps/web/src/components/forms/v2/signup.tsx b/apps/web/src/components/forms/v2/signup.tsx
index a7e33a759..b3b502993 100644
--- a/apps/web/src/components/forms/v2/signup.tsx
+++ b/apps/web/src/components/forms/v2/signup.tsx
@@ -108,17 +108,6 @@ export const SignUpFormV2 = ({
const name = form.watch('name');
const url = form.watch('url');
- // To continue we need to make sure name, email, password and signature are valid
- const canContinue =
- form.formState.dirtyFields.name &&
- form.formState.errors.name === undefined &&
- form.formState.dirtyFields.email &&
- form.formState.errors.email === undefined &&
- form.formState.dirtyFields.password &&
- form.formState.errors.password === undefined &&
- form.formState.dirtyFields.signature &&
- form.formState.errors.signature === undefined;
-
const { mutateAsync: signup } = trpc.auth.signup.useMutation();
const onFormSubmit = async ({ name, email, password, signature, url }: TSignUpFormV2Schema) => {
@@ -169,6 +158,14 @@ export const SignUpFormV2 = ({
}
};
+ const onNextClick = async () => {
+ const valid = await form.trigger(['name', 'email', 'password', 'signature']);
+
+ if (valid) {
+ setStep('CLAIM_USERNAME');
+ }
+ };
+
const onSignUpWithGoogleClick = async () => {
try {
await signIn('google', { callbackUrl: SIGN_UP_REDIRECT_PATH });
@@ -224,7 +221,7 @@ export const SignUpFormV2 = ({
-
+
{step === 'BASIC_DETAILS' && (
Create a new account
@@ -257,8 +254,8 @@ export const SignUpFormV2 = ({
{step === 'BASIC_DETAILS' && (