From 5e02ad8104d015cd594f50c59c9c6e6ab2c5579c Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Mon, 4 Sep 2023 16:35:28 +0530 Subject: [PATCH] fix: project invite modal members filter function (#2080) --- web/components/project/send-project-invitation-modal.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/components/project/send-project-invitation-modal.tsx b/web/components/project/send-project-invitation-modal.tsx index 035a680f2..b8f383f05 100644 --- a/web/components/project/send-project-invitation-modal.tsx +++ b/web/components/project/send-project-invitation-modal.tsx @@ -85,7 +85,8 @@ const SendProjectInvitationModal: React.FC = (props) => { }); const uninvitedPeople = people?.filter((person) => { - const isInvited = members?.find((member) => member.display_name === person.member.display_name); + const isInvited = members?.find((member) => member.memberId === person.member.id); + return !isInvited; }); @@ -143,7 +144,7 @@ const SendProjectInvitationModal: React.FC = (props) => { content: (
- {person.member.display_name} + {person.member.display_name} ({person.member.first_name + " " + person.member.last_name})
), }));