create-app: fix index route redirect

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-10-18 10:27:42 +02:00
parent abd043f4c0
commit 31f64105b2
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"