From fdc0df2579729d681121fe08b801faeb12a46331 Mon Sep 17 00:00:00 2001 From: NSUWAL123 Date: Fri, 26 Jul 2024 17:56:04 +0545 Subject: [PATCH] fix(comments): filter task comments only --- src/frontend/src/components/ProjectDetailsV2/Comments.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/components/ProjectDetailsV2/Comments.tsx b/src/frontend/src/components/ProjectDetailsV2/Comments.tsx index ba3aa0915c..7cccb4f4d8 100644 --- a/src/frontend/src/components/ProjectDetailsV2/Comments.tsx +++ b/src/frontend/src/components/ProjectDetailsV2/Comments.tsx @@ -29,6 +29,9 @@ const Comments = () => { return task?.index == selectedTask; })?.[0], }; + const filteredProjectCommentsList = projectCommentsList?.filter( + (comment) => !comment?.action_text?.includes('-SUBMISSION_INST-'), + ); useEffect(() => { dispatch(GetProjectComments(`${import.meta.env.VITE_API_URL}/tasks/${currentStatus?.id}/history/?comment=true`)); @@ -72,9 +75,9 @@ const Comments = () => { ) : (
- {projectCommentsList?.length > 0 ? ( + {filteredProjectCommentsList?.length > 0 ? (
- {projectCommentsList?.map((projectComment, i) => ( + {filteredProjectCommentsList?.map((projectComment, i) => (