catalog,scaffolder: fixups for failed codemod migrations

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-06-17 17:58:28 +02:00
parent d453c05dc3
commit fb5746cae5
2 changed files with 6 additions and 4 deletions
@@ -15,7 +15,6 @@
*/
import { Entity } from '@backstage/catalog-model';
import { IconComponent, IconKey, InfoCard, useApp } from '@backstage/core';
import { useEntity } from '@backstage/plugin-catalog-react';
import LanguageIcon from '@material-ui/icons/Language';
import React from 'react';
@@ -23,6 +22,9 @@ import { EntityLinksEmptyState } from './EntityLinksEmptyState';
import { LinksGridList } from './LinksGridList';
import { ColumnBreakpoints } from './types';
import { IconComponent, useApp } from '@backstage/core-plugin-api';
import { InfoCard } from '@backstage/core-components';
type Props = {
/** @deprecated The entity is now grabbed from context instead */
entity?: Entity;
@@ -34,7 +36,7 @@ export const EntityLinksCard = ({ cols = undefined, variant }: Props) => {
const { entity } = useEntity();
const app = useApp();
const iconResolver = (key: IconKey | undefined): IconComponent =>
const iconResolver = (key?: string): IconComponent =>
key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;
const links = entity?.metadata?.links;
@@ -15,13 +15,13 @@
*/
import { parseEntityName } from '@backstage/catalog-model';
import { IconComponent, IconKey, useApp, useRouteRef } from '@backstage/core';
import { entityRouteRef } from '@backstage/plugin-catalog-react';
import { Box } from '@material-ui/core';
import LanguageIcon from '@material-ui/icons/Language';
import React from 'react';
import { TaskOutput } from '../../types';
import { IconLink } from './IconLink';
import { IconComponent, useApp, useRouteRef } from '@backstage/core-plugin-api';
type TaskPageLinksProps = {
output: TaskOutput;
@@ -33,7 +33,7 @@ export const TaskPageLinks = ({ output }: TaskPageLinksProps) => {
const app = useApp();
const entityRoute = useRouteRef(entityRouteRef);
const iconResolver = (key: IconKey | undefined): IconComponent =>
const iconResolver = (key?: string): IconComponent =>
key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;
if (remoteUrl) {