From f192fa5c9693ffbece6512ce7a6bff0bdd645dcb Mon Sep 17 00:00:00 2001 From: ebarrios Date: Mon, 28 Sep 2020 10:20:49 +0200 Subject: [PATCH] Replaced Typography error with a WarningPanel --- plugins/cloudbuild/src/components/Cards/Cards.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/plugins/cloudbuild/src/components/Cards/Cards.tsx b/plugins/cloudbuild/src/components/Cards/Cards.tsx index 84d1bf9109..bbfb0b59c3 100644 --- a/plugins/cloudbuild/src/components/Cards/Cards.tsx +++ b/plugins/cloudbuild/src/components/Cards/Cards.tsx @@ -18,18 +18,13 @@ import { useWorkflowRuns } from '../useWorkflowRuns'; import { WorkflowRun, WorkflowRunsTable } from '../WorkflowRunsTable'; import { Entity } from '@backstage/catalog-model'; import { WorkflowRunStatus } from '../WorkflowRunStatus'; -import { - Link, - Theme, - makeStyles, - LinearProgress, - Typography, -} from '@material-ui/core'; +import { Link, Theme, makeStyles, LinearProgress } from '@material-ui/core'; import { InfoCard, StructuredMetadataTable, errorApiRef, useApi, + WarningPanel, } from '@backstage/core'; import ExternalLinkIcon from '@material-ui/icons/Launch'; import { CLOUDBUILD_ANNOTATION } from '../useProjectName'; @@ -53,7 +48,8 @@ const WidgetContent = ({ branch: string; }) => { const classes = useStyles(); - if (error) return Couldn't fetch latest {branch} run; + if (error) + return Couldn't fetch latest {branch} run; if (loading) return ; return (