Minor: redirect to home page for signin route when user is already logged in (#14915)

* Minor: redirect to home page for signin route when used is already logged in

* added more routes to redirect to home page
This commit is contained in:
Shailesh Parmar 2024-01-29 16:39:25 +05:30 committed by GitHub
parent db7db07812
commit 09b5bcc97c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1346,6 +1346,16 @@ const AuthenticatedAppRouter: FunctionComponent = () => {
)}
/>
{routeElements}
<Route
exact
path={[
ROUTES.SIGNIN,
ROUTES.REGISTER,
ROUTES.SIGNIN,
ROUTES.FORGOT_PASSWORD,
]}>
<Redirect to={ROUTES.MY_DATA} />
</Route>
<Route exact component={PageNotFound} path={ROUTES.NOT_FOUND} />
<Redirect to={ROUTES.NOT_FOUND} />
</Switch>