From 38f7add1b407172d6da54bf6bf74b48b057e2447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=ED=98=84=EC=A1=B0?= Date: Tue, 1 Oct 2024 17:10:06 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20=EB=A6=AC=EB=B7=B0=EB=94=94=ED=85=8C?= =?UTF-8?q?=EC=9D=BC=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EA=B6=8C=ED=95=9C=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/ReviewDetail.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/ReviewDetail.tsx b/frontend/src/pages/ReviewDetail.tsx index d017e83..210a275 100644 --- a/frontend/src/pages/ReviewDetail.tsx +++ b/frontend/src/pages/ReviewDetail.tsx @@ -5,6 +5,7 @@ import useReviewDetailQuery from '@/queries/reviews/useReviewDetailQuery'; import useApproveReviewQuery from '@/queries/reviews/useApproveReviewQuery'; import useRejectReviewQuery from '@/queries/reviews/useRejectReviewQuery'; import useAuthStore from '@/stores/useAuthStore'; +import useIsAdminOrManager from '@/hooks/useIsAdminOrManager'; import { Button } from '@/components/ui/button'; import 'slick-carousel/slick/slick.css'; import 'slick-carousel/slick/slick-theme.css'; @@ -34,6 +35,8 @@ export default function ReviewDetail(): JSX.Element { const [activeTab, setActiveTab] = useState<'content' | 'images'>('content'); + const isAdminOrManager = useIsAdminOrManager(Number(projectId)); + const handleApprove = () => { approveReviewMutation.mutate(undefined, { onSuccess: () => {}, @@ -134,7 +137,7 @@ export default function ReviewDetail(): JSX.Element { - {reviewDetail.reviewStatus !== 'APPROVED' && reviewDetail.reviewStatus !== 'REJECTED' && ( + {isAdminOrManager && reviewDetail.reviewStatus !== 'APPROVED' && reviewDetail.reviewStatus !== 'REJECTED' && ( <>