refactor: simplify home redirect (#5007)

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo 2025-08-22 12:59:50 +02:00 committed by GitHub
parent 46e1cefbac
commit e46f2a55c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 16 deletions

View File

@ -3,6 +3,9 @@ app:
baseUrl: http://localhost:3000
extensions:
- 'nav-item:catalog': false
- 'page:explore':
config:
path: '/'
backend:
baseUrl: http://localhost:7007
listen:

View File

@ -15,15 +15,12 @@
*/
import ReactDOM from 'react-dom/client';
import { Navigate } from 'react-router';
import { createApp } from '@backstage/frontend-defaults';
import {
ApiBlueprint,
PageBlueprint,
createFrontendModule,
createFrontendPlugin,
} from '@backstage/frontend-plugin-api';
import catalogPlugin from '@backstage/plugin-catalog/alpha';
@ -33,18 +30,6 @@ import explorePlugin from '../src/alpha';
import { catalogApiMock } from '@backstage/plugin-catalog-react/testUtils';
const homePlugin = createFrontendPlugin({
pluginId: 'home',
extensions: [
PageBlueprint.make({
params: {
path: '/',
loader: async () => <Navigate to="/explore" />,
},
}),
],
});
const components = [
{
apiVersion: 'backstage.io/v1alpha1',
@ -100,7 +85,7 @@ const catalogPluginOverrides = createFrontendModule({
});
const app = createApp({
features: [homePlugin, explorePlugin, catalogPlugin, catalogPluginOverrides],
features: [explorePlugin, catalogPlugin, catalogPluginOverrides],
});
const root = app.createRoot();