Feat: 리뷰디테일 페이지 권한 설정
This commit is contained in:
parent
1a64e28b69
commit
38f7add1b4
@ -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 {
|
||||
<Link to={`/admin/${workspaceId}/reviews`}>
|
||||
<Button variant="black">목록으로 돌아가기</Button>
|
||||
</Link>
|
||||
{reviewDetail.reviewStatus !== 'APPROVED' && reviewDetail.reviewStatus !== 'REJECTED' && (
|
||||
{isAdminOrManager && reviewDetail.reviewStatus !== 'APPROVED' && reviewDetail.reviewStatus !== 'REJECTED' && (
|
||||
<>
|
||||
<Button
|
||||
variant="red"
|
||||
|
Loading…
Reference in New Issue
Block a user