Skip to content

Commit a8da586

Browse files
committed
chore: adjust information payload profile
1 parent f978822 commit a8da586

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

src/domains/Profile.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export const profileResSchema = z.object({
1111
gender: z.string(),
1212
phone_number: z.string(),
1313
address: z.string(),
14-
github: z.string(),
15-
linkedin: z.string(),
16-
personal_web: z.string(),
14+
github_url: z.string(),
15+
linkedin_url: z.string(),
16+
personal_web_url: z.string(),
1717
created_at: z.date(),
1818
updated_at: z.date(),
1919
});
@@ -28,9 +28,9 @@ export const createProfileFormSchema = (t: (key: string) => string) =>
2828
gender: z.string().min(1, t("validation.gender-required")),
2929
phone_number: z.string().min(1, t("validation.phone-number-required")),
3030
address: z.string().min(1, t("validation.address-required")),
31-
github: z.string().url(t("validation.github-invalid-url")).optional().or(z.literal("")),
32-
linkedin: z.string().url(t("validation.linkedin-invalid-url")).optional().or(z.literal("")),
33-
personal_web: z.string().url(t("validation.personal-web-invalid-url")).optional().or(z.literal("")),
31+
github_url: z.string().url(t("validation.github-invalid-url")).optional().or(z.literal("")),
32+
linkedin_url: z.string().url(t("validation.linkedin-invalid-url")).optional().or(z.literal("")),
33+
personal_web_url: z.string().url(t("validation.personal-web-invalid-url")).optional().or(z.literal("")),
3434
});
3535

3636
export type ProfileFormType = z.infer<ReturnType<typeof createProfileFormSchema>>;

src/features/profile/components/ProfileForm.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ const ProfileForm = ({ activeTab }: ProfileFormProps) => {
3535
phone_number: "",
3636
gender: "",
3737
address: "",
38-
github: "",
39-
linkedin: "",
40-
personal_web: "",
38+
github_url: "",
39+
linkedin_url: "",
40+
personal_web_url: "",
4141
},
4242
});
4343

@@ -50,9 +50,9 @@ const ProfileForm = ({ activeTab }: ProfileFormProps) => {
5050
phone_number: data.phone_number || "",
5151
gender: data.gender || "",
5252
address: data.address || "",
53-
github: data.github || "",
54-
linkedin: data.linkedin || "",
55-
personal_web: data.personal_web || "",
53+
github_url: data.github_url || "",
54+
linkedin_url: data.linkedin_url || "",
55+
personal_web_url: data.personal_web_url || "",
5656
};
5757

5858
form.reset(resetData);
@@ -201,7 +201,7 @@ const ProfileForm = ({ activeTab }: ProfileFormProps) => {
201201
<>
202202
<FormField
203203
control={form.control}
204-
name="github"
204+
name="github_url"
205205
render={({ field }) => (
206206
<FormItem>
207207
<FormLabel>{t("form.label.github")}</FormLabel>
@@ -215,7 +215,7 @@ const ProfileForm = ({ activeTab }: ProfileFormProps) => {
215215

216216
<FormField
217217
control={form.control}
218-
name="linkedin"
218+
name="linkedin_url"
219219
render={({ field }) => (
220220
<FormItem>
221221
<FormLabel>{t("form.label.linkedin")}</FormLabel>
@@ -229,7 +229,7 @@ const ProfileForm = ({ activeTab }: ProfileFormProps) => {
229229

230230
<FormField
231231
control={form.control}
232-
name="personal_web"
232+
name="personal_web_url"
233233
render={({ field }) => (
234234
<FormItem>
235235
<FormLabel>{t("form.label.personal-web")}</FormLabel>

0 commit comments

Comments
 (0)