import React , { Component } from 'react' ; import Alert from '@material-ui/lab/Alert' ; interface Props { } interface MyProps { } interface MyState { hasError : boolean ; } export default class ErrorBoundary extends Component < MyProps , MyState > { static getDerivedStateFromError ( ) { return { hasError : true } ; } constructor ( props ) { super ( props ) ; this . state = { hasError : false } ; } render ( ) { if ( this . state . hasError ) { return ( < Alert severity = "error" > Something went wrong . Please make sure that you installed : < strong > < a href = "https://github.com/RoadieHQ/backstage-plugin-argoCD" target = "_blank" rel = "noopener noreferrer" > @ roadiehq /backstage-plugin-argoCD plugin < /a> < /strong> < /Alert>); } return this . props . children ; } }