From 5e8d278f8e133d2436b26ab2b93d8c1a4e6e0038 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 19 Jan 2022 18:38:43 +0100 Subject: [PATCH] create-app: update to bind the org plugin catalog index route Signed-off-by: Patrik Oldsberg --- .changeset/rude-hounds-happen.md | 27 +++++++++++++++++++ .../default-app/packages/app/src/App.tsx | 4 +++ 2 files changed, 31 insertions(+) create mode 100644 .changeset/rude-hounds-happen.md diff --git a/.changeset/rude-hounds-happen.md b/.changeset/rude-hounds-happen.md new file mode 100644 index 0000000000..b88c2b12d2 --- /dev/null +++ b/.changeset/rude-hounds-happen.md @@ -0,0 +1,27 @@ +--- +'@backstage/create-app': patch +--- + +Added an external route binding from the `org` plugin to the catalog index page. + +This change is needed because `@backstage/plugin-org` now has a required external route that needs to be bound for the app to start. + +To apply this change to an existing app, make the following change to `packages/app/src/App.tsx`: + +```diff + import { ScaffolderPage, scaffolderPlugin } from '@backstage/plugin-scaffolder'; ++import { orgPlugin } from '@backstage/plugin-org'; + import { SearchPage } from '@backstage/plugin-search'; +``` + +And further down within the `createApp` call: + +```diff + bind(scaffolderPlugin.externalRoutes, { + registerComponent: catalogImportPlugin.routes.importPage, + }); ++ bind(orgPlugin.externalRoutes, { ++ catalogIndex: catalogPlugin.routes.catalogIndex, ++ }); + }, +``` diff --git a/packages/create-app/templates/default-app/packages/app/src/App.tsx b/packages/create-app/templates/default-app/packages/app/src/App.tsx index 8a535835b4..a0767a6ab8 100644 --- a/packages/create-app/templates/default-app/packages/app/src/App.tsx +++ b/packages/create-app/templates/default-app/packages/app/src/App.tsx @@ -11,6 +11,7 @@ import { catalogImportPlugin, } from '@backstage/plugin-catalog-import'; import { ScaffolderPage, scaffolderPlugin } from '@backstage/plugin-scaffolder'; +import { orgPlugin } from '@backstage/plugin-org'; import { SearchPage } from '@backstage/plugin-search'; import { TechRadarPage } from '@backstage/plugin-tech-radar'; import { @@ -42,6 +43,9 @@ const app = createApp({ bind(scaffolderPlugin.externalRoutes, { registerComponent: catalogImportPlugin.routes.importPage, }); + bind(orgPlugin.externalRoutes, { + catalogIndex: catalogPlugin.routes.catalogIndex, + }); }, });