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' && ( <>