ownershipcard: prettier

Signed-off-by: Jan Vilimek <jan.vilimek@oriflame.com>
This commit is contained in:
Jan Vilimek
2021-12-13 11:11:20 +01:00
parent 2fd0010a15
commit 64dc7ed8c6
2 changed files with 5 additions and 3 deletions
@@ -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;