remove name from EntityTypeProps attribute

Signed-off-by: Prasetya Aria Wibawa <prasetya.wibawa@grabtaxi.com>
This commit is contained in:
Prasetya Aria Wibawa
2021-08-20 12:10:22 +07:00
parent 1dab504713
commit c64c039289
@@ -43,7 +43,6 @@ import {
import { useApi, useRouteRef } from '@backstage/core-plugin-api';
type EntityTypeProps = {
name: string;
kind: string;
type: string;
count: number;
@@ -173,12 +172,10 @@ export const OwnershipCard = ({
const match = acc.find(
x => x.kind === ownedEntity.kind && x.type === ownedEntity.spec?.type,
);
const name = ownedEntity.metadata.name;
if (match) {
match.count += 1;
} else {
acc.push({
name,
kind: ownedEntity.kind,
type: ownedEntity.spec?.type,
count: 1,