From 3e3037064aa629f49845e67b475299c9d65cd40e Mon Sep 17 00:00:00 2001 From: parkyejin Date: Tue, 3 Sep 2024 04:48:39 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=94=84=EB=A1=9C=ED=95=84=20=EA=B8=B0?= =?UTF-8?q?=EB=B3=B8=20=EC=9D=B4=EB=AF=B8=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/user/UserProfileUpdate.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/user/UserProfileUpdate.tsx b/src/components/user/UserProfileUpdate.tsx index 54f0ba7..d98263d 100644 --- a/src/components/user/UserProfileUpdate.tsx +++ b/src/components/user/UserProfileUpdate.tsx @@ -27,6 +27,7 @@ const UserProfileUpdate = ({ onUpdate }: UserProfileUpdateProps) => { const [mbti, setMbti] = useState<(string | null)[]>([null, null, null, null]) const [introduction, setIntroduction] = useState(null) + /* 프로필 정보 초기화 */ useEffect(() => { if (profile) { setProfileImgUrl(profile.profileImgUrl || null) @@ -41,6 +42,7 @@ const UserProfileUpdate = ({ onUpdate }: UserProfileUpdateProps) => { } }, [profile]) + /* 프로필 정보 업데이트 */ useEffect(() => { if (profile) { const mbtiString = mbti.map((char) => char || '').join('') @@ -111,7 +113,6 @@ const UserProfileUpdate = ({ onUpdate }: UserProfileUpdateProps) => { if (profileImgUrl === profile?.profileImgUrl) { deleteProfileImg(undefined, { onSuccess: () => { - setProfileImgUrl(defaultImageUrl) if (profileImgUrl === defaultImageUrl) { showToast('기본 이미지는 삭제할 수 없습니다.') } @@ -125,7 +126,6 @@ const UserProfileUpdate = ({ onUpdate }: UserProfileUpdateProps) => { else { deleteProfileImgS3(profile?.profileImgUrl || '', { onSuccess: () => { - setProfileImgUrl(defaultImageUrl) if (profileImgUrl === defaultImageUrl) { showToast('기본 이미지는 삭제할 수 없습니다.') }