plugins: remove unnecessary use of convertLegacyRouteRef(s)
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -12,7 +12,8 @@ import { IconComponent } from '@backstage/frontend-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
|
||||
|
||||
// @alpha (undocumented)
|
||||
const _default: OverridableFrontendPlugin<
|
||||
@@ -45,7 +46,7 @@ const _default: OverridableFrontendPlugin<
|
||||
{
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
},
|
||||
'core.nav-item.target',
|
||||
{}
|
||||
@@ -54,7 +55,7 @@ const _default: OverridableFrontendPlugin<
|
||||
params: {
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
};
|
||||
}>;
|
||||
'page:devtools': OverridableExtensionDefinition<{
|
||||
@@ -70,7 +71,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -81,7 +82,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ import {
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
|
||||
import { devToolsApiRef, DevToolsClient } from '../api';
|
||||
import { convertLegacyRouteRef } from '@backstage/core-compat-api';
|
||||
import BuildIcon from '@material-ui/icons/Build';
|
||||
import { rootRouteRef } from '../routes';
|
||||
|
||||
@@ -46,7 +45,7 @@ export const devToolsApi = ApiBlueprint.make({
|
||||
export const devToolsPage = PageBlueprint.make({
|
||||
params: {
|
||||
path: '/devtools',
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
loader: () =>
|
||||
import('../components/DevToolsPage').then(m => <m.DevToolsPage />),
|
||||
},
|
||||
@@ -56,7 +55,7 @@ export const devToolsPage = PageBlueprint.make({
|
||||
export const devToolsNavItem = NavItemBlueprint.make({
|
||||
params: {
|
||||
title: 'DevTools',
|
||||
routeRef: convertLegacyRouteRef(rootRouteRef),
|
||||
routeRef: rootRouteRef,
|
||||
icon: BuildIcon,
|
||||
},
|
||||
});
|
||||
@@ -66,7 +65,7 @@ export default createFrontendPlugin({
|
||||
pluginId: 'devtools',
|
||||
info: { packageJson: () => import('../../package.json') },
|
||||
routes: {
|
||||
root: convertLegacyRouteRef(rootRouteRef),
|
||||
root: rootRouteRef,
|
||||
},
|
||||
extensions: [devToolsApi, devToolsPage, devToolsNavItem],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user