Skip to content

Commit 42c133d

Browse files
committed
#RI-2475 - fix nested routes
1 parent cb59ef2 commit 42c133d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

redisinsight/ui/src/components/main-router/components/RedisStackRoutes.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useDispatch } from 'react-redux'
22
import React, { useEffect, useState } from 'react'
3-
import { useHistory } from 'react-router-dom'
3+
import { Switch, useHistory } from 'react-router-dom'
44

55
import {
66
checkConnectToInstanceAction,
@@ -47,7 +47,7 @@ const Router = ({ databaseId = '' }: IProps) => {
4747
return connection.loading
4848
? <PagePlaceholder />
4949
: (
50-
<>
50+
<Switch>
5151
{ROUTES
5252
.map((route, i) => (
5353
route.protected
@@ -60,7 +60,7 @@ const Router = ({ databaseId = '' }: IProps) => {
6060
// eslint-disable-next-line react/no-array-index-key
6161
: <RouteWithSubRoutes key={i} {...route} />
6262
))}
63-
</>
63+
</Switch>
6464
)
6565
}
6666

0 commit comments

Comments
 (0)