app-next: updates for new routing APIs

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-10-12 14:38:51 +02:00
parent 6b4ae484ad
commit 44c9b738c2
2 changed files with 8 additions and 9 deletions
+2 -1
View File
@@ -26,6 +26,7 @@ import {
} from '@backstage/frontend-plugin-api';
import { entityRouteRef } from '@backstage/plugin-catalog-react';
import techdocsPlugin from '@backstage/plugin-techdocs/alpha';
import { convertLegacyRouteRef } from '@backstage/core-plugin-api/alpha';
/*
@@ -59,7 +60,7 @@ TODO:
const entityPageExtension = createPageExtension({
id: 'catalog:entity',
defaultPath: '/catalog/:namespace/:kind/:name',
routeRef: entityRouteRef,
routeRef: convertLegacyRouteRef(entityRouteRef),
loader: async () => <div>Just a temporary mocked entity page</div>,
});
@@ -19,18 +19,16 @@ import { Link } from '@backstage/core-components';
import {
createPageExtension,
createPlugin,
} from '@backstage/frontend-plugin-api';
import {
useRouteRef,
createRouteRef,
createExternalRouteRef,
} from '@backstage/core-plugin-api';
useRouteRef,
} from '@backstage/frontend-plugin-api';
import { Route, Routes } from 'react-router-dom';
const indexRouteRef = createRouteRef({ id: 'index' });
const page1RouteRef = createRouteRef({ id: 'page1' });
export const externalPageXRouteRef = createExternalRouteRef({ id: 'pageX' });
export const pageXRouteRef = createRouteRef({ id: 'pageX' });
const indexRouteRef = createRouteRef();
const page1RouteRef = createRouteRef();
export const externalPageXRouteRef = createExternalRouteRef();
export const pageXRouteRef = createRouteRef();
// const page2RouteRef = createSubRouteRef({
// id: 'page2',
// parent: page1RouteRef,