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:
Fredrik Adelöw
2022-09-22 11:32:56 +02:00
parent 62872bf027
commit 58c2264325
3 changed files with 14 additions and 2 deletions
+12
View File
@@ -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).
+1 -1
View File
@@ -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"