fix: redirect from home to catalog

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2025-08-20 09:53:10 +02:00
parent d0161c57b4
commit b2d9fc1939
4 changed files with 24 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/create-app': minor
---
Creates a plugin that redirects from the Home page to the Catalog index page to avoid seeing a not found page error when starting the app.
@@ -1,7 +1,8 @@
import { createApp } from '@backstage/frontend-defaults';
import catalogPlugin from '@backstage/plugin-catalog/alpha';
import { homePlugin } from './plugins/home';
import { navModule } from './modules/nav';
export default createApp({
features: [catalogPlugin, navModule],
features: [homePlugin,catalogPlugin, navModule],
});
@@ -0,0 +1,9 @@
import { PageBlueprint } from '@backstage/frontend-plugin-api';
import { Navigate } from 'react-router';
export const HomePage = PageBlueprint.make({
params: {
path: '/',
loader: async () => <Navigate to="catalog" />
}
});
@@ -0,0 +1,8 @@
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
import { HomePage } from './HomePage';
export const homePlugin = createFrontendPlugin({
pluginId: 'home',
extensions: [HomePage],
});