NFS - Added App Root Elements

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
This commit is contained in:
Andre Wanlin
2025-07-04 11:09:25 -05:00
parent 72f52b6ff9
commit d52d67f700
8 changed files with 64 additions and 2 deletions
+10 -1
View File
@@ -21,8 +21,10 @@ import {
PageBlueprint,
createFrontendPlugin,
createRouteRef,
AppRootElementBlueprint,
} from '@backstage/frontend-plugin-api';
import { compatWrapper } from '@backstage/core-compat-api';
import { VisitListener } from './components/';
const rootRouteRef = createRouteRef();
@@ -63,13 +65,20 @@ const homePage = PageBlueprint.makeWithOverrides({
},
});
const visitListenerAppRootElement = AppRootElementBlueprint.make({
name: 'visit-listener',
params: {
element: <VisitListener />,
},
});
/**
* @alpha
*/
export default createFrontendPlugin({
pluginId: 'home',
info: { packageJson: () => import('../package.json') },
extensions: [homePage],
extensions: [homePage, visitListenerAppRootElement],
routes: {
root: rootRouteRef,
},