fix: ensures router switch only contains top-level route components

This commit is contained in:
James
2022-07-11 08:31:43 -07:00
parent 38b52bf67b
commit 91c4ef226b

View File

@@ -106,18 +106,20 @@ const Routes = () => {
<Route path={`${match.url}/logout`}>
<Logout />
</Route>
<Route path={`${match.url}/logout-inactivity`}>
<Logout inactivity />
</Route>
{!userCollection.auth.disableLocalStrategy && (
<React.Fragment>
<Route path={`${match.url}/logout-inactivity`}>
<Logout inactivity />
</Route>
<Route path={`${match.url}/forgot`}>
<ForgotPassword />
</Route>
<Route path={`${match.url}/reset/:token`}>
<ResetPassword />
</Route>
</React.Fragment>
<Route path={`${match.url}/forgot`}>
<ForgotPassword />
</Route>
)}
{!userCollection.auth.disableLocalStrategy && (
<Route path={`${match.url}/reset/:token`}>
<ResetPassword />
</Route>
)}
{collections.map((collection) => {