fix: redirect from home to catalog
Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
@@ -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],
|
||||
});
|
||||
Reference in New Issue
Block a user