Skip to content

Commit

Permalink
fix(comments): filter task comments only
Browse files Browse the repository at this point in the history
  • Loading branch information
NSUWAL123 committed Jul 26, 2024
1 parent fad1437 commit fdc0df2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/frontend/src/components/ProjectDetailsV2/Comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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`));
Expand Down Expand Up @@ -72,9 +75,9 @@ const Comments = () => {
</div>
) : (
<div>
{projectCommentsList?.length > 0 ? (
{filteredProjectCommentsList?.length > 0 ? (
<div className="fmtm-flex fmtm-flex-col fmtm-gap-4 fmtm-mb-1">
{projectCommentsList?.map((projectComment, i) => (
{filteredProjectCommentsList?.map((projectComment, i) => (
<div
key={i}
className="fmtm-flex fmtm-w-full fmtm-gap-4 fmtm-px-2 fmtm-border-b fmtm-border-[#e9e9e9] sm:fmtm-border-white fmtm-pb-3"
Expand Down

0 comments on commit fdc0df2

Please sign in to comment.