Merge pull request #14187 from backstage/rugvip/redirect

create-app: fix index route redirect
This commit is contained in:
Patrik Oldsberg
2022-10-18 11:10:55 +02:00
committed by GitHub
3 changed files with 3 additions and 3 deletions
@@ -178,7 +178,7 @@ When migrating over to React Router v6 stable, you might also see browser consol
```diff
- <Navigate key="/" to="catalog" />
+ <Route path="/" element={<Navigate to="/catalog" />} />
+ <Route path="/" element={<Navigate to="catalog" />} />
```
### `NavLink`
+1 -1
View File
@@ -150,7 +150,7 @@ const AppRouter = app.getRouter();
const routes = (
<FlatRoutes>
<Route path="/" element={<Navigate 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>
<Route path="/" element={<Navigate to="/catalog" />} />
<Route path="/" element={<Navigate to="catalog" />} />
<Route path="/catalog" element={<CatalogIndexPage />} />
<Route
path="/catalog/:namespace/:kind/:name"