From 66148a4e210a44c4f09361635568977d4f351803 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:57:21 +0900 Subject: [PATCH] =?UTF-8?q?[FE]=20=EB=A6=AC=EB=B7=B0=EC=99=84=EB=A3=8C=20?= =?UTF-8?q?=ED=95=9C=EB=B2=88=EC=97=90=20=ED=81=B4=EB=A6=AD=20=EC=8B=9C=20?= =?UTF-8?q?=EC=9D=BC=EC=96=B4=EB=82=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0(#781)=20(#782)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 코드리뷰 완료 버튼을 한번에 클릭했을때 발생하는 문제 해결 * fix: 참여하기 버튼 클릭 시 private 방에서만 PR 작성에 대한 추가 문구가 보이도록 수정 --------- Co-authored-by: Lee sang Yeop --- .../roomDetailPage/myReviewee/MyReviewee.tsx | 18 ++++++++---------- .../roomCardModal/RoomCardModalButton.tsx | 6 +++++- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/roomDetailPage/myReviewee/MyReviewee.tsx b/frontend/src/components/roomDetailPage/myReviewee/MyReviewee.tsx index 895955ed..111e7b23 100644 --- a/frontend/src/components/roomDetailPage/myReviewee/MyReviewee.tsx +++ b/frontend/src/components/roomDetailPage/myReviewee/MyReviewee.tsx @@ -33,16 +33,14 @@ const MyReviewee = ({ roomInfo }: MyRevieweeProps) => { if (loadingButtonId.includes(reviewee.userId)) return; setLoadingButtonId((prev) => [...prev, reviewee.userId]); - postReviewCompleteMutation.mutate( - { roomId: roomInfo.id, revieweeId: reviewee.userId }, - { - onSuccess: () => { - handleNavigateFeedbackPage(reviewee); - setLoadingButtonId((prev) => prev.filter((id) => id !== reviewee.userId)); - }, - onError: () => setLoadingButtonId((prev) => prev.filter((id) => id !== reviewee.userId)), - }, - ); + postReviewCompleteMutation + .mutateAsync({ roomId: roomInfo.id, revieweeId: reviewee.userId }) + .then(() => { + handleNavigateFeedbackPage(reviewee); + }) + .finally(() => { + setLoadingButtonId((prev) => prev.filter((id) => id !== reviewee.userId)); + }); }; // 리뷰 및 피드백 여부 버튼 렌더링 함수 diff --git a/frontend/src/components/shared/roomCardModal/RoomCardModalButton.tsx b/frontend/src/components/shared/roomCardModal/RoomCardModalButton.tsx index 15d2ed02..5ec0c614 100644 --- a/frontend/src/components/shared/roomCardModal/RoomCardModalButton.tsx +++ b/frontend/src/components/shared/roomCardModal/RoomCardModalButton.tsx @@ -127,7 +127,11 @@ const RoomCardModalButton = ({ roomInfo }: RoomCardModalButtonProps) => { -