Skip to content

Commit

Permalink
refactor: 최종리뷰 결과가 저장되지 않은 수신자에 대해서만 리뷰 저장 호출
Browse files Browse the repository at this point in the history
  • Loading branch information
khj0426 committed Nov 26, 2023
1 parent 1205ad0 commit cffa1ac
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ interface ReviewDetailAccordionProps {
receiverId: string
receiverName: string
reviewId: string
ResponserList?: number[]
}

const ReceiverReviewDetail = ({
receiverId,
reviewId,
receiverName,
ResponserList,
}: ReviewDetailAccordionProps) => {
//NOTE - 하나라도 응답 실패했을 떄 처리
const { data: getReviewQuestion } = useGetReviewQuestion({
Expand Down Expand Up @@ -77,7 +79,9 @@ const ReceiverReviewDetail = ({

const { mutate: updateFinalReviewAnswer } = useUpdateFinalReviewAnswer()
useEffect(() => {
saveFinalResult()
if (!ResponserList?.includes(Number(receiverId))) {
saveFinalResult()
}
}, [receiverId])

//NOTE - 전체 몇 명이 응답했는지 여부
Expand Down

0 comments on commit cffa1ac

Please sign in to comment.