fix(register-component): pass through the catalog router ref
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
AlertDisplay,
|
||||
OAuthRequestDialog,
|
||||
SidebarPage,
|
||||
createRouteRef,
|
||||
} from '@backstage/core';
|
||||
import { apis } from './apis';
|
||||
import * as plugins from './plugins';
|
||||
@@ -11,8 +12,9 @@ import { AppSidebar } from './sidebar';
|
||||
import { Route, Routes, Navigate } from 'react-router';
|
||||
import { Router as CatalogRouter } from '@backstage/plugin-catalog';
|
||||
import { Router as DocsRouter } from '@backstage/plugin-techdocs';
|
||||
|
||||
import { Router as RegisterComponentRouter } from '@backstage/plugin-register-component';
|
||||
import { Router as TechRadarRouter } from '@backstage/plugin-tech-radar';
|
||||
|
||||
import { EntityPage } from './components/catalog/EntityPage';
|
||||
|
||||
const app = createApp({
|
||||
@@ -24,6 +26,12 @@ const AppProvider = app.getProvider();
|
||||
const AppRouter = app.getRouter();
|
||||
const deprecatedAppRoutes = app.getRoutes();
|
||||
|
||||
const catalogRouteRef = createRouteRef({
|
||||
path: '/catalog',
|
||||
title: 'Service Catalog',
|
||||
});
|
||||
|
||||
|
||||
const App: FC<{}> = () => (
|
||||
<AppProvider>
|
||||
<AlertDisplay />
|
||||
@@ -42,6 +50,10 @@ const App: FC<{}> = () => (
|
||||
path="/tech-radar"
|
||||
element={<TechRadarRouter width={1500} height={800} />}
|
||||
/>
|
||||
<Route
|
||||
path="/register-component"
|
||||
element={<RegisterComponentRouter catalogRouteRef={catalogRouteRef} />}
|
||||
/>
|
||||
{deprecatedAppRoutes}
|
||||
</Routes>
|
||||
</SidebarPage>
|
||||
|
||||
Reference in New Issue
Block a user