ownershipcard: prettier
Signed-off-by: Jan Vilimek <jan.vilimek@oriflame.com>
This commit is contained in:
@@ -352,7 +352,7 @@ describe('OwnershipCardWithCustomFilterDefinition', () => {
|
||||
const { getByText } = await renderInTestApp(
|
||||
<TestApiProvider apis={[[catalogApiRef, catalogApi]]}>
|
||||
<EntityProvider entity={groupEntity}>
|
||||
<OwnershipCard entityFilterKind={['API','system']} />
|
||||
<OwnershipCard entityFilterKind={['API', 'system']} />
|
||||
</EntityProvider>
|
||||
</TestApiProvider>,
|
||||
{
|
||||
|
||||
@@ -128,7 +128,7 @@ const getQueryParams = (
|
||||
|
||||
export const OwnershipCard = ({
|
||||
variant,
|
||||
entityFilterKind
|
||||
entityFilterKind,
|
||||
}: {
|
||||
/** @deprecated The entity is now grabbed from context instead */
|
||||
entity?: Entity;
|
||||
@@ -165,7 +165,9 @@ export const OwnershipCard = ({
|
||||
const counts = ownedEntitiesList.reduce(
|
||||
(acc: EntityTypeProps[], ownedEntity) => {
|
||||
const match = acc.find(
|
||||
x => x.kind === ownedEntity.kind && x.type === (ownedEntity.spec?.type ?? ownedEntity.kind),
|
||||
x =>
|
||||
x.kind === ownedEntity.kind &&
|
||||
x.type === (ownedEntity.spec?.type ?? ownedEntity.kind),
|
||||
);
|
||||
if (match) {
|
||||
match.count += 1;
|
||||
|
||||
Reference in New Issue
Block a user