plugins: remove unnecessary use of convertLegacyRouteRef(s)
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -15,16 +15,12 @@
|
||||
*/
|
||||
|
||||
import { PageBlueprint } from '@backstage/frontend-plugin-api';
|
||||
import { convertLegacyRouteRef } from '@backstage/core-compat-api';
|
||||
import { rootCatalogKubernetesRouteRef } from '../plugin';
|
||||
|
||||
export const kubernetesPage = PageBlueprint.make({
|
||||
params: {
|
||||
path: '/kubernetes',
|
||||
// you can reuse the existing routeRef
|
||||
// by wrapping into the convertLegacyRouteRef.
|
||||
routeRef: convertLegacyRouteRef(rootCatalogKubernetesRouteRef),
|
||||
// these inputs usually match the props required by the component.
|
||||
routeRef: rootCatalogKubernetesRouteRef,
|
||||
loader: () => import('../Router').then(m => <m.Router />),
|
||||
},
|
||||
});
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { convertLegacyRouteRefs } from '@backstage/core-compat-api';
|
||||
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { kubernetesPage } from './pages';
|
||||
import { entityKubernetesContent } from './entityContents';
|
||||
@@ -37,5 +36,5 @@ export default createFrontendPlugin({
|
||||
kubernetesAuthProvidersApi,
|
||||
kubernetesClusterLinkFormatterApi,
|
||||
],
|
||||
routes: convertLegacyRouteRefs({ kubernetes: rootCatalogKubernetesRouteRef }),
|
||||
routes: { kubernetes: rootCatalogKubernetesRouteRef },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user