From 7d2c0cb101b301078eef01fc9f106dafd4846ab9 Mon Sep 17 00:00:00 2001 From: Kim0426 <706shin1728@naver.com> Date: Tue, 5 Dec 2023 00:56:40 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=84=A4=EB=AC=B8=EB=A7=88?= =?UTF-8?q?=EA=B0=90,=EC=A0=84=EC=86=A1=20=ED=9B=84=20=EB=AA=A8=EB=8B=AC?= =?UTF-8?q?=20=EB=8B=AB=ED=9E=88=EA=B2=8C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/CreatedReviewManagePage/index.tsx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/pages/CreatedReviewManagePage/index.tsx b/src/pages/CreatedReviewManagePage/index.tsx index 6d8d3f97..dc961718 100644 --- a/src/pages/CreatedReviewManagePage/index.tsx +++ b/src/pages/CreatedReviewManagePage/index.tsx @@ -1,7 +1,7 @@ //생성한 리뷰 관리 페이지 import { AxiosError } from 'axios' -import { Suspense, useState } from 'react' +import { Suspense, useState, useRef } from 'react' import { useLocation } from 'react-router-dom' import { useToast } from '@/hooks' import { Header, Modal, ReviewInfo } from '@/components' @@ -40,9 +40,12 @@ const CreatedReviewManagePage = () => { }) const { mutate: closeReview } = useCloseSurvey({ id: reviewId }) + const closeReviewRef = useRef(null) + const sendReviewRef = useRef(null) const { mutate: sendReview } = useSendReview({ reviewId }) const handleClickSurveyClose = () => { + closeReviewRef?.current?.click() closeReview(undefined, { onSuccess: () => { addToast({ @@ -68,6 +71,8 @@ const CreatedReviewManagePage = () => { return } + sendReviewRef?.current?.click() + sendReview(undefined, { onSuccess: ({ data }) => { if (data.errorCode && data.message) { @@ -144,7 +149,11 @@ const CreatedReviewManagePage = () => { className={`btn fixed bottom-10 cursor-pointer self-end rounded-md bg-active-orange text-white dark:text-black `} > -