Fixed typo and added a type

This commit is contained in:
Sebastian Qvarfordt
2020-06-03 10:17:37 +02:00
parent d620646890
commit a2a3d7ea2b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ export class CatalogClient implements CatalogApi {
throw new Error(`'Entity not found: ${name}`);
}
async getLocationByEntity(entity: Entity): Promise<Location | undefined> {
const findLocationIdInEntity = (e: Entity) =>
const findLocationIdInEntity = (e: Entity): string | undefined =>
e.metadata.annotations?.['backstage.io/managed-by-location'];
const locationId = findLocationIdInEntity(entity);
@@ -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');