Skip to content

Commit

Permalink
fix(#48): 프로필 이미지 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
uiop5809 committed Aug 22, 2024
1 parent e1e672f commit edf3da4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/auth/UserProfileUpdate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ const UserProfileUpdate = ({ onUpdate }: UserProfileUpdateProps) => {
setProfileImgUrl(defaultImageUrl)
},
onError: () => {
showToast('기본 이미지는 삭제할 수 없습니다.')
if (profileImgUrl !== profile?.profileImgUrl) {
setProfileImgUrl(defaultImageUrl)
} else {
showToast('기본 이미지는 삭제할 수 없습니다.')
}
},
})
}
Expand Down

0 comments on commit edf3da4

Please sign in to comment.