Skip to content

Commit

Permalink
Merge pull request #264 from MeeTeamIdle/release-1.0
Browse files Browse the repository at this point in the history
fix: 프로필 편집 이슈 해결 배포브랜치에 적용
  • Loading branch information
kimsuyeon0916 authored Oct 24, 2024
2 parents d283128 + d7e7d92 commit 2f17429
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/profile/edit/ProfileEditPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
ModalPortal,
Modal,
} from '../../../components';
import { useRecoilValue } from 'recoil';
import { useRecoilState, useRecoilValue } from 'recoil';
import { uploadImageState, userState } from '../../../atom';
import { Skill, Award, Link } from '../../../types';
import {
Expand Down Expand Up @@ -78,6 +78,7 @@ const ProfileEditPage = () => {

const updateProfileInSuccess = (userId: string) => {
navigate(`/profile/${userId}`);
setUploadImage(null); // 전역 업로드 이미지 초기화
};

const { mutate: updateProfile } = useUpdateProfile({
Expand All @@ -86,7 +87,7 @@ const ProfileEditPage = () => {
});

// 이미지 업로드
const uploadImage = useRecoilValue(uploadImageState);
const [uploadImage, setUploadImage] = useRecoilState(uploadImageState);
const {
data: imageResponse,
refetch: readImagePresignedUrl,
Expand Down

0 comments on commit 2f17429

Please sign in to comment.