Design: 헤더 추가, 리뷰 요청 이동링크도 추가

This commit is contained in:
정현조 2024-09-23 21:44:00 +09:00
parent 69ca08dae7
commit d695867edf
2 changed files with 45 additions and 20 deletions

View File

@ -1,8 +1,9 @@
import { useState } from 'react';
import { useParams } from 'react-router-dom';
import { useParams, Link } from 'react-router-dom';
import useReviewByStatusQuery from '@/queries/reviews/useReviewByStatusQuery';
import useAuthStore from '@/stores/useAuthStore';
import ReviewList from '@/components/ReviewList';
import { Button } from '@/components/ui/button';
export default function ProjectReviewList() {
const { workspaceId, projectId } = useParams<{ workspaceId: string; projectId: string }>();
@ -20,14 +21,26 @@ export default function ProjectReviewList() {
);
return (
<ReviewList
reviews={projectReviews}
activeTab={activeTab}
setActiveTab={setActiveTab}
setSearchQuery={setSearchQuery}
sortValue={sortValue}
setSortValue={setSortValue}
workspaceId={Number(workspaceId)}
/>
<div>
<header className="bg-background sticky top-0 z-10 flex h-[57px] items-center gap-1 border-b px-4">
<h1 className="text-xl font-semibold"> </h1>
<Link
to={`/admin/${workspaceId}/reviews/request`}
className="ml-auto"
>
<Button variant="default"> </Button>
</Link>
</header>
<ReviewList
reviews={projectReviews}
activeTab={activeTab}
setActiveTab={setActiveTab}
setSearchQuery={setSearchQuery}
sortValue={sortValue}
setSortValue={setSortValue}
workspaceId={Number(workspaceId)}
/>
</div>
);
}

View File

@ -1,8 +1,9 @@
import { useState } from 'react';
import { useParams } from 'react-router-dom';
import { useParams, Link } from 'react-router-dom';
import useWorkspaceReviewsQuery from '@/queries/workspaces/useWorkspaceReviewsQuery';
import useAuthStore from '@/stores/useAuthStore';
import ReviewList from '@/components/ReviewList';
import { Button } from '@/components/ui/button';
export default function WorkspaceReviewList() {
const { workspaceId } = useParams<{ workspaceId: string }>();
@ -20,14 +21,25 @@ export default function WorkspaceReviewList() {
);
return (
<ReviewList
reviews={workspaceReviews}
activeTab={activeTab}
setActiveTab={setActiveTab}
setSearchQuery={setSearchQuery}
sortValue={sortValue}
setSortValue={setSortValue}
workspaceId={Number(workspaceId)}
/>
<div>
<header className="bg-background sticky top-0 z-10 flex h-[57px] items-center gap-1 border-b px-4">
<h1 className="text-xl font-semibold"> </h1>
<Link
to={`/admin/${workspaceId}/reviews/request`}
className="ml-auto"
>
<Button variant="default"> </Button>
</Link>
</header>
<ReviewList
reviews={workspaceReviews}
activeTab={activeTab}
setActiveTab={setActiveTab}
setSearchQuery={setSearchQuery}
sortValue={sortValue}
setSortValue={setSortValue}
workspaceId={Number(workspaceId)}
/>
</div>
);
}