passing down isGroup value from ownershipCard to useGetEntities
Signed-off-by: Prasetya Aria Wibawa <prasetya.wibawa@grabtaxi.com>
This commit is contained in:
@@ -89,16 +89,19 @@ const EntityCountTile = ({
|
||||
export const ComponentsGrid = ({
|
||||
entity,
|
||||
relationsType,
|
||||
isGroup,
|
||||
entityFilterKind,
|
||||
}: {
|
||||
entity: Entity;
|
||||
relationsType: string;
|
||||
isGroup: boolean;
|
||||
entityFilterKind?: string[];
|
||||
}) => {
|
||||
const catalogLink = useRouteRef(catalogIndexRouteRef);
|
||||
const { componentsWithCounters, loading, error } = useGetEntities(
|
||||
entity,
|
||||
relationsType,
|
||||
isGroup,
|
||||
entityFilterKind,
|
||||
);
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ export const OwnershipCard = ({
|
||||
<ComponentsGrid
|
||||
entity={entity}
|
||||
relationsType={relationsType}
|
||||
isGroup={isGroup}
|
||||
entityFilterKind={entityFilterKind}
|
||||
/>
|
||||
</InfoCard>
|
||||
|
||||
@@ -128,6 +128,7 @@ const getAggregatedOwnersEntityRef = async (
|
||||
export function useGetEntities(
|
||||
entity: Entity,
|
||||
relationsType: string,
|
||||
isGroup: boolean,
|
||||
entityFilterKind?: string[],
|
||||
): {
|
||||
componentsWithCounters:
|
||||
@@ -143,7 +144,6 @@ export function useGetEntities(
|
||||
} {
|
||||
const catalogApi = useApi(catalogApiRef);
|
||||
const kinds = entityFilterKind ?? ['Component', 'API', 'System'];
|
||||
const isGroup = entity.kind === 'Group';
|
||||
|
||||
const {
|
||||
loading,
|
||||
|
||||
Reference in New Issue
Block a user