Skip to content

Commit

Permalink
fix: 회원가입 및 프로필 수정 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
semnil5202 committed Dec 15, 2024
1 parent f973185 commit 1d4a134
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/pages/ProfileEdit/ProfileEdit.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@ interface QueryStringProps {
}

const ProfileEdit = () => {
const prevInputtedData = getSessionData('profileEditData') as QueryStringProps;
const prevInputtedData = getSessionData('profileEditData') as QueryStringProps | undefined;

const navigate = useNavigate();
const openAlert = useAlert();
const { mainSkills, detailSkills, skillLevels, regions, my } = useProfileEditQuery();
const { fieldValue, fieldErrorValue, setFieldErrorValue, onChangeField } = useField<FieldValue>({
nickname: prevInputtedData.nickname ?? my.nickname ?? '',
company: prevInputtedData.workingPlace ?? my.workingPlace ?? '',
intro: prevInputtedData.introduction ?? my.introduction ?? '',
nickname: prevInputtedData?.nickname ?? my.nickname ?? '',
company: prevInputtedData?.workingPlace ?? my.workingPlace ?? '',
intro: prevInputtedData?.introduction ?? my.introduction ?? '',
});
const { dropdownValue, onResetDropdown, onClickDropdown } = useDropdown<DropdownValue>({
mainSkill: mainSkills.find(({ id }) => id === prevInputtedData.mainSkillId)?.name ?? my.mainSkill ?? '',
mainSkill: mainSkills.find(({ id }) => id === prevInputtedData?.mainSkillId)?.name ?? my.mainSkill ?? '',
skillDepthOne: '',
skillDepthTwo: '',
skillDepthThree: '',
region: regions.find((place) => place.id === prevInputtedData.livingPlaceId)?.name ?? my.livingPlace ?? '',
region: regions.find((place) => place.id === prevInputtedData?.livingPlaceId)?.name ?? my.livingPlace ?? '',
});
const { skillDepthOneId, selectedSkillDepths, onDeleteSkill } = useSetDetailSkills({
initialValue: my.skills,
Expand Down
12 changes: 6 additions & 6 deletions src/pages/SignUp/SignUp.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,24 @@ interface QueryStringProps {
}

const SignUpPage = () => {
const prevInputtedData = getSessionData('signUpData') as QueryStringProps;
const prevInputtedData = getSessionData('signUpData') as QueryStringProps | undefined;

const navigate = useNavigate();
const openAlert = useAlert();
const { state: memberInfo }: { state: OauthMemberInfo | null } = useLocation();

const { mainSkills, detailSkills, skillLevels, regions } = useSignUpQuery();
const { fieldValue, fieldErrorValue, setFieldErrorValue, onChangeField } = useField<FieldValue>({
nickname: prevInputtedData.nickname ?? '',
company: prevInputtedData.workingPlace ?? '',
intro: prevInputtedData.introduction ?? '',
nickname: prevInputtedData?.nickname ?? '',
company: prevInputtedData?.workingPlace ?? '',
intro: prevInputtedData?.introduction ?? '',
});
const { dropdownValue, onResetDropdown, onClickDropdown } = useDropdown<DropdownValue>({
mainSkill: mainSkills.find(({ id }) => id === prevInputtedData.mainSkillId)?.name ?? '',
mainSkill: mainSkills.find(({ id }) => id === prevInputtedData?.mainSkillId)?.name ?? '',
skillDepthOne: '',
skillDepthTwo: '',
skillDepthThree: '',
region: regions.find((place) => place.id === prevInputtedData.livingPlaceId)?.name ?? '',
region: regions.find((place) => place.id === prevInputtedData?.livingPlaceId)?.name ?? '',
});
const { skillDepthOneId, selectedSkillDepths, onDeleteSkill } = useSetDetailSkills({
mainSkills,
Expand Down

0 comments on commit 1d4a134

Please sign in to comment.