From 8afa44d5105961e2b821b5195cd52d6dc9537238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=84=B8=EB=AF=BC?= <89172499+semnil5202@users.noreply.github.com> Date: Wed, 17 Apr 2024 22:53:19 +0900 Subject: [PATCH] =?UTF-8?q?Refactor/#109:=20=ED=9A=8C=EC=9B=90=EA=B0=80?= =?UTF-8?q?=EC=9E=85=20=EB=B0=8F=20=ED=94=84=EB=A1=9C=ED=95=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=EC=8B=9C=20=EC=A7=80=EC=97=AD=20=EB=AF=B8=EC=84=A0?= =?UTF-8?q?=ED=83=9D=20=EA=B2=BD=EC=9A=B0=EC=97=90=20null=20=EA=B0=92=20?= =?UTF-8?q?=EB=B3=B4=EB=82=B4=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD=20(#1?= =?UTF-8?q?11)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: 회원 가입시 지역 미선택 경우 빈 스트링 대신 null 보내도록 변경 서버 요청사항 입니다. * refactor: 프로필 수정시 지역 미선택 경우 빈 스트링 대신 null 보내도록 변경 서버 요청사항 입니다. --- src/pages/ProfileEdit/ProfileEdit.page.tsx | 2 +- src/pages/ProfileEdit/types/index.ts | 2 +- src/pages/SignUp/SignUp.page.tsx | 2 +- src/pages/SignUp/types/index.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/ProfileEdit/ProfileEdit.page.tsx b/src/pages/ProfileEdit/ProfileEdit.page.tsx index 1ade3920..a1ae16d3 100644 --- a/src/pages/ProfileEdit/ProfileEdit.page.tsx +++ b/src/pages/ProfileEdit/ProfileEdit.page.tsx @@ -91,7 +91,7 @@ const ProfileEdit = () => { profileImageUrl: my.profileImageUrl || '', skills: selectedSkillDepths.map(({ id, name }) => ({ skillId: id, level: name.split(', ')[1] })), joinPurposes: checkboxValue.goal.filter(({ checked }) => checked).map(({ id }) => id), - livingPlace: dropdownValue.region, + livingPlace: dropdownValue.region || null, workingPlace: fieldValue.company, introduction: fieldValue.intro, }); diff --git a/src/pages/ProfileEdit/types/index.ts b/src/pages/ProfileEdit/types/index.ts index af46ac5c..eef067c9 100644 --- a/src/pages/ProfileEdit/types/index.ts +++ b/src/pages/ProfileEdit/types/index.ts @@ -14,7 +14,7 @@ export interface PutSignUp { profileImageUrl: string; skills: Omit[]; joinPurposes: number[]; - livingPlace?: string; + livingPlace: string | null; workingPlace?: string; introduction?: string; } diff --git a/src/pages/SignUp/SignUp.page.tsx b/src/pages/SignUp/SignUp.page.tsx index 4905a791..ad0a5ef3 100644 --- a/src/pages/SignUp/SignUp.page.tsx +++ b/src/pages/SignUp/SignUp.page.tsx @@ -94,7 +94,7 @@ const SignUpPage = () => { profileImageUrl: memberInfo?.profileImageUrl || '', skills: selectedSkillDepths.map(({ id, name }) => ({ skillId: id, level: name.split(', ')[1] })), joinPurposes: checkboxValue.goal.filter(({ checked }) => checked).map(({ id }) => id), - livingPlace: dropdownValue.region, + livingPlace: dropdownValue.region || null, workingPlace: fieldValue.company, introduction: fieldValue.intro, email: memberInfo?.email || '', diff --git a/src/pages/SignUp/types/index.ts b/src/pages/SignUp/types/index.ts index 8add0db6..60bd1e11 100644 --- a/src/pages/SignUp/types/index.ts +++ b/src/pages/SignUp/types/index.ts @@ -17,7 +17,7 @@ export interface PostSignUp { level: string; }[]; joinPurposes: number[]; - livingPlace?: string; + livingPlace: string | null; workingPlace?: string; introduction?: string; email: string;