From a2a3d7ea2b74c49975a77a0cd743339fbab9cc79 Mon Sep 17 00:00:00 2001 From: Sebastian Qvarfordt Date: Wed, 3 Jun 2020 10:17:37 +0200 Subject: [PATCH] Fixed typo and added a type --- plugins/catalog/src/api/CatalogClient.ts | 2 +- plugins/catalog/src/components/CatalogPage/CatalogPage.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/catalog/src/api/CatalogClient.ts b/plugins/catalog/src/api/CatalogClient.ts index bf308cb012..abba8a7523 100644 --- a/plugins/catalog/src/api/CatalogClient.ts +++ b/plugins/catalog/src/api/CatalogClient.ts @@ -44,7 +44,7 @@ export class CatalogClient implements CatalogApi { throw new Error(`'Entity not found: ${name}`); } async getLocationByEntity(entity: Entity): Promise { - const findLocationIdInEntity = (e: Entity) => + const findLocationIdInEntity = (e: Entity): string | undefined => e.metadata.annotations?.['backstage.io/managed-by-location']; const locationId = findLocationIdInEntity(entity); diff --git a/plugins/catalog/src/components/CatalogPage/CatalogPage.tsx b/plugins/catalog/src/components/CatalogPage/CatalogPage.tsx index fe21c7de31..24337337c9 100644 --- a/plugins/catalog/src/components/CatalogPage/CatalogPage.tsx +++ b/plugins/catalog/src/components/CatalogPage/CatalogPage.tsx @@ -81,7 +81,7 @@ const CatalogPage: FC<{}> = () => { const actions = [ (rowData: Component) => ({ icon: GitHub, - tooltop: 'View on GitHub', + tooltip: 'View on GitHub', onClick: () => { if (!rowData || !rowData.location) return; window.open(rowData.location.target, '_blank');