import { useEntity } from '@backstage/plugin-catalog-react' ; import { MissingAnnotationEmptyState } from '@backstage/core-components' ; import React from 'react' ; import { Route , Routes } from 'react-router' ; import { DatadogDashboardPage } from './components/DatadogDashboardPage' ; import { DATADOG_ANNOTATION_DASHBOARD_URL } from './components/useDatadogAppData' ; import { isDatadogDashboardAvailable } from './plugin' ; deprecated export const Router = ( ) => { const { entity } = useEntity ( ) ; return ! isDatadogDashboardAvailable ( entity ) ? ( < MissingAnnotationEmptyState annotation = { DATADOG_ANNOTATION_DASHBOARD_URL } / > ) : ( < Routes > < Route path = "/" element = { < DatadogDashboardPage entity = { entity } / > } /> < /Routes>); } ;