Skip to content

Commit

Permalink
Merge pull request #46 from NishantGupt786/master
Browse files Browse the repository at this point in the history
hello
  • Loading branch information
NishantGupt786 authored Mar 15, 2024
2 parents fe6a059 + 0e16dcc commit 74968db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function PersonalDetails({
firstName: "",
lastName: "",
email: email ?? "",
phoneNumber: "",
phone_number: "",
country: "+91",
gender: undefined,
},
Expand All @@ -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",
Expand All @@ -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);
Expand Down Expand Up @@ -163,7 +163,7 @@ export default function PersonalDetails({

<FormField
control={form.control}
name="phoneNumber"
name="phone_number"
render={({ field }) => (
<FormItem className="grow">
<FormLabel>Phone Number</FormLabel>
Expand All @@ -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"
: ""
}`}
Expand Down
2 changes: 1 addition & 1 deletion devsoc24-portal-fe/src/components/forms/vitian-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion devsoc24-portal-fe/src/schemas/signup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 74968db

Please sign in to comment.