Use WarningPanel

Signed-off-by: Adam Harvey <adam.harvey@dxc.com>
This commit is contained in:
Adam Harvey
2021-03-25 09:53:38 -04:00
parent 4491ba231f
commit 3039179996
@@ -31,9 +31,9 @@ import {
InfoCard,
Progress,
useApi,
WarningPanel,
} from '@backstage/core';
import { Box, Typography } from '@material-ui/core';
import { Alert } from '@material-ui/lab';
import ZoomOutMap from '@material-ui/icons/ZoomOutMap';
import React from 'react';
import { useAsync } from 'react-use';
@@ -138,7 +138,11 @@ export function SystemDiagramCard() {
if (loading) {
return <Progress />;
} else if (error) {
return <Alert severity="error">{error.message}</Alert>;
return (
<WarningPanel severity="error" title="Could not load system diagram">
{error.message}
</WarningPanel>
);
}
return (