diff --git a/devsoc24-portal-fe/src/app/signup/details/personal-details-form.tsx b/devsoc24-portal-fe/src/app/signup/details/personal-details-form.tsx index fd7a35c..cba4564 100644 --- a/devsoc24-portal-fe/src/app/signup/details/personal-details-form.tsx +++ b/devsoc24-portal-fe/src/app/signup/details/personal-details-form.tsx @@ -42,7 +42,7 @@ export default function PersonalDetails({ firstName: "", lastName: "", email: email ?? "", - phoneNumber: "", + phone_number: "", country: "+91", gender: undefined, }, @@ -54,7 +54,7 @@ export default function PersonalDetails({ form.setValue("firstName", localStorage.getItem("first_name") ?? ""); form.setValue("lastName", localStorage.getItem("last_name") ?? ""); form.setValue("email", email ?? ""); - form.setValue("phoneNumber", localStorage.getItem("phone_number") ?? ""); + form.setValue("phone_number", localStorage.getItem("phone_number") ?? ""); form.setValue("country", localStorage.getItem("country") ?? "+91"); form.setValue( "gender", @@ -69,7 +69,7 @@ export default function PersonalDetails({ async function onSubmit(data: PersonalDetailsFormValues) { localStorage.setItem("first_name", data.firstName); localStorage.setItem("last_name", data.lastName); - localStorage.setItem("phone_number", data.phoneNumber); + localStorage.setItem("phone_number", data.phone_number); localStorage.setItem("country", data.country); localStorage.setItem("gender", data.gender); setForm(1); @@ -163,7 +163,7 @@ export default function PersonalDetails({ ( Phone Number @@ -176,7 +176,7 @@ export default function PersonalDetails({ required {...field} className={`pl-[80px] ${ - form.getFieldState("phoneNumber").invalid + form.getFieldState("phone_number").invalid ? "border-red-500 focus:border-input focus:!ring-red-500" : "" }`} diff --git a/devsoc24-portal-fe/src/components/forms/vitian-form.tsx b/devsoc24-portal-fe/src/components/forms/vitian-form.tsx index c377251..3b2e94c 100644 --- a/devsoc24-portal-fe/src/components/forms/vitian-form.tsx +++ b/devsoc24-portal-fe/src/components/forms/vitian-form.tsx @@ -55,7 +55,7 @@ export default function VitianForm({ const updatedData = { first_name: localStorage.getItem("first_name"), last_name: localStorage.getItem("last_name"), - phoneNumber: localStorage.getItem("phone_number"), + phone_number: localStorage.getItem("phone_number"), gender: localStorage.getItem("gender"), country: localStorage.getItem("country"), is_vitian: true, diff --git a/devsoc24-portal-fe/src/schemas/signup.ts b/devsoc24-portal-fe/src/schemas/signup.ts index 933a8df..b69ffbd 100644 --- a/devsoc24-portal-fe/src/schemas/signup.ts +++ b/devsoc24-portal-fe/src/schemas/signup.ts @@ -65,7 +65,7 @@ export const personalDetailsSchema = z.object({ .email({ message: "Email must be a valid email address", }), - phoneNumber: z + phone_number: z .string({ required_error: "Required", invalid_type_error: "Phone number must be a string",