app-next: hook up fake entityRoute
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
@@ -14,11 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { createApp } from '@backstage/frontend-app-api';
|
||||
import { pagesPlugin } from './examples/pagesPlugin';
|
||||
import graphiqlPlugin from '@backstage/plugin-graphiql/alpha';
|
||||
import techRadarPlugin from '@backstage/plugin-tech-radar/alpha';
|
||||
import userSettingsPlugin from '@backstage/plugin-user-settings/alpha';
|
||||
import {
|
||||
createPageExtension,
|
||||
createPlugin,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
import { entityRouteRef } from '@backstage/plugin-catalog-react';
|
||||
|
||||
/*
|
||||
|
||||
@@ -49,8 +55,26 @@ TODO:
|
||||
|
||||
/* app.tsx */
|
||||
|
||||
const fakePlugin = createPlugin({
|
||||
id: 'fake',
|
||||
extensions: [
|
||||
createPageExtension({
|
||||
id: 'catalog:entity',
|
||||
defaultPath: '/fakeentity',
|
||||
routeRef: entityRouteRef,
|
||||
loader: async () => <div>hello 😅</div>,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
const app = createApp({
|
||||
features: [graphiqlPlugin, pagesPlugin, techRadarPlugin, userSettingsPlugin],
|
||||
features: [
|
||||
graphiqlPlugin,
|
||||
pagesPlugin,
|
||||
techRadarPlugin,
|
||||
userSettingsPlugin,
|
||||
fakePlugin,
|
||||
],
|
||||
// bindRoutes({ bind }) {
|
||||
// bind(catalogPlugin.externalRoutes, {
|
||||
// createComponent: scaffolderPlugin.routes.root,
|
||||
|
||||
Reference in New Issue
Block a user