mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-14 03:26:47 +00:00
fix(ui): fix a type error when a CorpGroup entity appears in the search result with theme V2 (#13254)
This commit is contained in:
parent
210dcdc557
commit
05a42196d7
@ -23,7 +23,7 @@ export default function GroupMembersSidebarSectionContent({ groupMemberRelations
|
|||||||
|
|
||||||
const entityRegistry = useEntityRegistry();
|
const entityRegistry = useEntityRegistry();
|
||||||
const relationshipsTotal = groupMemberRelationships?.total || 0;
|
const relationshipsTotal = groupMemberRelationships?.total || 0;
|
||||||
const relationshipsAvailableCount = groupMemberRelationships.relationships?.length || 0;
|
const relationshipsAvailableCount = groupMemberRelationships?.relationships?.length || 0;
|
||||||
|
|
||||||
const hasHiddenEntities = relationshipsTotal > relationshipsAvailableCount;
|
const hasHiddenEntities = relationshipsTotal > relationshipsAvailableCount;
|
||||||
const isShowingMaxEntities = entityCount >= relationshipsAvailableCount;
|
const isShowingMaxEntities = entityCount >= relationshipsAvailableCount;
|
||||||
@ -36,7 +36,7 @@ export default function GroupMembersSidebarSectionContent({ groupMemberRelations
|
|||||||
<Typography.Paragraph type="secondary">No members yet.</Typography.Paragraph>
|
<Typography.Paragraph type="secondary">No members yet.</Typography.Paragraph>
|
||||||
)}
|
)}
|
||||||
{relationshipsTotal > 0 &&
|
{relationshipsTotal > 0 &&
|
||||||
groupMemberRelationships.relationships.map((item, index) => {
|
groupMemberRelationships?.relationships.map((item, index) => {
|
||||||
const user = item.entity as CorpUser;
|
const user = item.entity as CorpUser;
|
||||||
return index < entityCount && <GroupMemberLink user={user} entityRegistry={entityRegistry} />;
|
return index < entityCount && <GroupMemberLink user={user} entityRegistry={entityRegistry} />;
|
||||||
})}
|
})}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user