Fixed typo and added a type
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user