update accountType

This commit is contained in:
smanylov
2026-01-29 17:01:00 +07:00
parent 27d8e75986
commit fc81d471ff
2 changed files with 16 additions and 15 deletions
+6 -5
View File
@@ -146,9 +146,9 @@ export async function registration(
state: FormState | undefined,
formData: FormData,
): Promise<FormState> {
const registrationType = formData.get('accoutType') as string || '';
const accountType = formData.get('accountType') as string || '';
console.log(registrationType);
console.log(accountType);
const fullName = formData.get('fullName') as string || '';
const email = formData.get('email') as string || '';
@@ -167,7 +167,7 @@ export async function registration(
password,
confirm_password,
agree,
...(registrationType === 'btb' && { companyName })
...(accountType === 'btb' && { companyName })
};
const validatedFields = SignupFormSchema.safeParse(dataToValidate);
@@ -193,7 +193,7 @@ export async function registration(
confirm_password,
phone,
agree,
...(registrationType === 'btb' && { companyName })
...(accountType === 'btb' && { companyName })
},
error: errors
};
@@ -211,7 +211,8 @@ export async function registration(
email,
phone: phone,
password,
...(registrationType === 'btb' && { companyName: companyName })
accountType,
...(accountType === 'btb' && { companyName: companyName })
}
}),
headers: {