Feature/test routing (#9)

* Test fix routing

* test routing
This commit is contained in:
grigoriishveps 2021-11-29 12:29:39 +03:00 committed by GitHub
parent b367536be1
commit ac53c1bb09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 8 deletions

View File

@ -67,13 +67,11 @@ const renderRouteConfig = (
}
return (
<BrowserRouter>
<Container key={contextPath}>
<Switch>
{children as JSX.TChildren[]}
</Switch>
</Container>
</BrowserRouter>
<Container key={contextPath}>
<Switch>
{children as JSX.TChildren[]}
</Switch>
</Container>
)
}
@ -88,7 +86,11 @@ const Router: React.FC<Props> = (props: Props) => {
const preparedRoutes = prepareRoutes(routeConfig)
return renderRouteConfig(component, preparedRoutes, baseUrlPath)
return (
<BrowserRouter>
{renderRouteConfig(component, preparedRoutes, baseUrlPath)}
</BrowserRouter>
)
}
export default Router