update Navigate properly, and add a changeset noting the router stable update in create-app
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Newly created Backstage repositories now use the stable version 6 of
|
||||
`react-router`, just like the main repo does. Please let us know if you find any
|
||||
issues with this.
|
||||
|
||||
Migrating to the stable version of `react-router` is optional for the time
|
||||
being. But if you want to do the same for your existing repository, please
|
||||
follow [this
|
||||
guide](https://backstage.io/docs/tutorials/react-router-stable-migration).
|
||||
@@ -148,7 +148,7 @@ const AppRouter = app.getRouter();
|
||||
|
||||
const routes = (
|
||||
<FlatRoutes>
|
||||
<Navigate key="/" to="catalog" />
|
||||
<Route path="/" element={<Navigate to="/catalog" />} />
|
||||
{/* TODO(rubenl): Move this to / once its more mature and components exist */}
|
||||
<Route path="/home" element={<HomepageCompositionRoot />}>
|
||||
{homePage}
|
||||
|
||||
@@ -58,7 +58,7 @@ const AppRouter = app.getRouter();
|
||||
|
||||
const routes = (
|
||||
<FlatRoutes>
|
||||
<Navigate key="/" to="catalog" />
|
||||
<Route path="/" element={<Navigate to="/catalog" />} />
|
||||
<Route path="/catalog" element={<CatalogIndexPage />} />
|
||||
<Route
|
||||
path="/catalog/:namespace/:kind/:name"
|
||||
|
||||
Reference in New Issue
Block a user