Skip to content

Commit

Permalink
Merge pull request #349 from TEAM-SEONYAK/fix/#345/optionalImage
Browse files Browse the repository at this point in the history
[ Fix ] 이미지 미업로드 시 빈문자열로 처리하도록 수정
  • Loading branch information
lydiacho authored Nov 11, 2024
2 parents 7dfee98 + ae9700f commit 366f257
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ const Step개인정보입력 = () => {
};

const handleClickLink = () => {
if (!res || !imageFile) return;
imageUploadMutate({ url: res.url, image: imageFile });
if (res && imageFile) {
imageUploadMutate({ url: res.url, image: imageFile });
}
setData((prev) => ({
...prev,
imageFile,
image: res.fileName,
image: imageFile ? res.fileName : '',
nickname: nickname,
isNicknameValid: true,
}));
Expand Down
2 changes: 1 addition & 1 deletion src/pages/onboarding/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface JoinPropType {
nickname: string;
isNicknameValid?: boolean;
image: string;
imageFile?: File;
imageFile?: File | null;
phoneNumber: string;
univName: string;
field: string;
Expand Down

0 comments on commit 366f257

Please sign in to comment.