From 745a1198d82520e2c9cfbb0c90418bf490c09763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=ED=98=84=EC=A1=B0?= Date: Fri, 20 Sep 2024 07:11:32 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20=EB=A6=AC=EB=B7=B0=EC=83=81=EC=84=B8?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EA=B4=80=EB=A0=A8=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReviewList/ProjectReviewList.tsx | 4 +- .../src/components/ReviewList/ReviewItem.tsx | 63 ++++++++++++------- .../ReviewList/WorkspaceReviewList.tsx | 2 + 3 files changed, 46 insertions(+), 23 deletions(-) diff --git a/frontend/src/components/ReviewList/ProjectReviewList.tsx b/frontend/src/components/ReviewList/ProjectReviewList.tsx index e2ec225..a9c3002 100644 --- a/frontend/src/components/ReviewList/ProjectReviewList.tsx +++ b/frontend/src/components/ReviewList/ProjectReviewList.tsx @@ -9,7 +9,7 @@ interface ProjectReviewListProps { workspaceId: number; } -export default function ProjectReviewList({ projectId }: ProjectReviewListProps): JSX.Element { +export default function ProjectReviewList({ projectId, workspaceId }: ProjectReviewListProps): JSX.Element { const profile = useAuthStore((state) => state.profile); const memberId = profile?.id || 0; @@ -58,6 +58,8 @@ export default function ProjectReviewList({ projectId }: ProjectReviewListProps) projectReviews.map((item) => ( = { @@ -16,34 +20,49 @@ const typeIcons: Record<'classification' | 'detection' | 'segmentation', JSX.Ele segmentation: , }; -export default function ReviewItem({ title, createdTime, creatorName, projectId, status, type }: ReviewItemProps) { +export default function ReviewItem({ + title, + createdTime, + creatorName, + projectId, + status, + type, + workspaceId, + reviewId, +}: ReviewItemProps) { const profile = useAuthStore((state) => state.profile); const memberId = profile?.id || 0; const icon = type ? typeIcons[type.text] : null; const { data: projectData } = useProjectQuery(projectId, memberId); + return ( -
-
-

{title}

-

by {creatorName}

-
- -

{projectData.title}

-
- {type && ( -
- {icon} - {type.text} + +
+
+

{title}

+

by {creatorName}

+
+ +

{projectData?.title}

- )} + {type && ( +
+ {icon} + {type.text} +
+ )} +
+
+
{status}
+

Created at {createdTime}

+
-
-
{status}
-

Created at {createdTime}

-
-
+ ); } diff --git a/frontend/src/components/ReviewList/WorkspaceReviewList.tsx b/frontend/src/components/ReviewList/WorkspaceReviewList.tsx index cdae53f..4209653 100644 --- a/frontend/src/components/ReviewList/WorkspaceReviewList.tsx +++ b/frontend/src/components/ReviewList/WorkspaceReviewList.tsx @@ -57,6 +57,8 @@ export default function WorkspaceReviewList({ workspaceId }: WorkspaceReviewList workspaceReviews.map((item) => (