improvement: improve empty table labeling for org group/users

This commit is contained in:
Scott Wilson
2024-10-21 10:20:43 -07:00
parent 7403385e7c
commit ca0241bb51
2 changed files with 14 additions and 2 deletions

View File

@@ -335,7 +335,12 @@ export const OrgGroupsTable = ({ handlePopUpOpen }: Props) => {
})}
</TBody>
</Table>
{groups?.length === 0 && <EmptyState title="No groups found" icon={faUsers} />}
{filteredGroups?.length === 0 && (
<EmptyState
title={groups?.length === 0 ? "No groups found" : "No groups match search"}
icon={faUsers}
/>
)}
</TableContainer>
</div>
);

View File

@@ -377,7 +377,14 @@ export const OrgMembersTable = ({ handlePopUpOpen, setCompleteInviteLinks }: Pro
</TBody>
</Table>
{!isLoading && filterdUser?.length === 0 && (
<EmptyState title="No organization members found" icon={faUsers} />
<EmptyState
title={
members?.length === 0
? "No organization members found"
: "No organization members match search"
}
icon={faUsers}
/>
)}
</TableContainer>
</div>