From a414cecaebe8412e313b5645e017074c9cb34216 Mon Sep 17 00:00:00 2001 From: Kim0426 <706shin1728@naver.com> Date: Tue, 28 Nov 2023 00:07:17 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=88=98=EC=A0=95=EB=90=9C=20api?= =?UTF-8?q?=EB=A1=9C=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/CreatedReviewManagePage/index.tsx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/pages/CreatedReviewManagePage/index.tsx b/src/pages/CreatedReviewManagePage/index.tsx index e7df0a76..87e1337f 100644 --- a/src/pages/CreatedReviewManagePage/index.tsx +++ b/src/pages/CreatedReviewManagePage/index.tsx @@ -5,7 +5,7 @@ import { useLocation } from 'react-router-dom' import { Header } from '@/components' import { useCloseSurvey, - useGetReviewQuestion, + useGetReviewForCreator, useCheckAllReceiverReceived, useSendReview, } from '@/apis/hooks' @@ -27,8 +27,8 @@ const CreatedReviewManagePage = () => { ) //NOTE - 리뷰의 질문을 가져온다! - const { data: getReviewQuestion } = useGetReviewQuestion({ - id: reviewId, + const { data: getReviewQuestion } = useGetReviewForCreator({ + id: Number(reviewId), }) const { data: checkAllReceiverReceived } = useCheckAllReceiverReceived({ @@ -45,7 +45,7 @@ const CreatedReviewManagePage = () => { const handleClickSendSurvey = () => { if ( !checkAllReceiverReceived?.success || - getReviewQuestion.data.status === 'END' + getReviewQuestion?.status === 'END' ) { //NOTE - 토스트 처리 @@ -91,14 +91,12 @@ const CreatedReviewManagePage = () => {