update: Handled empty state in adding members to project.

This commit is contained in:
gurusainath 2023-05-22 22:38:22 +05:30
parent 2e638b28b6
commit f095594be9

View File

@ -162,14 +162,22 @@ const SendProjectInvitationModal: React.FC<Props> = ({ isOpen, setIsOpen, member
input
width="w-full"
>
{uninvitedPeople?.map((person) => (
<CustomSelect.Option
key={person.member.id}
value={person.member.id}
>
{person.member.email}
</CustomSelect.Option>
))}
{uninvitedPeople && uninvitedPeople.length > 0 ? (
<>
{uninvitedPeople?.map((person) => (
<CustomSelect.Option
key={person.member.id}
value={person.member.id}
>
{person.member.email}
</CustomSelect.Option>
))}
</>
) : (
<div className="text-center text-sm py-5">
Invite members to workspace before adding them to a project.
</div>
)}
</CustomSelect>
)}
/>