From e4d5b8c7fff92b0520cc7b346632277c76febc8b Mon Sep 17 00:00:00 2001 From: Prasetya Aria Wibawa Date: Fri, 4 Mar 2022 15:13:45 +0700 Subject: [PATCH] rename owner to ownerEntity for getQueryParams Signed-off-by: Prasetya Aria Wibawa --- .../components/Cards/OwnershipCard/useDirectEntities.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/org/src/components/Cards/OwnershipCard/useDirectEntities.ts b/plugins/org/src/components/Cards/OwnershipCard/useDirectEntities.ts index 20d4c3a76d..6b8886a5e6 100644 --- a/plugins/org/src/components/Cards/OwnershipCard/useDirectEntities.ts +++ b/plugins/org/src/components/Cards/OwnershipCard/useDirectEntities.ts @@ -35,10 +35,10 @@ type EntityTypeProps = { }; const getQueryParams = ( - owner: Entity, + ownerEntity: Entity, selectedEntity: EntityTypeProps, ): string => { - const ownerName = humanizeEntityRef(owner, { defaultKind: 'group' }); + const ownerName = humanizeEntityRef(ownerEntity, { defaultKind: 'group' }); const { kind, type } = selectedEntity; const filters = { kind, @@ -46,8 +46,8 @@ const getQueryParams = ( owners: [ownerName], user: 'all', }; - if (owner.kind === 'User') { - const ownerGroups = getEntityRelations(owner, RELATION_MEMBER_OF, { + if (ownerEntity.kind === 'User') { + const ownerGroups = getEntityRelations(ownerEntity, RELATION_MEMBER_OF, { kind: 'Group', }); const ownerGroupsName = ownerGroups.map(ownerGroup => ownerGroup.name);