feat: redirect to the setup page if user is verified

This commit is contained in:
Ahmed Bouhuolia
2024-05-06 17:45:32 +02:00
parent a5bfb0b02b
commit dd02ae471e
2 changed files with 28 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ import { SplashScreen, DashboardThemeProvider } from '../components';
import { queryConfig } from '../hooks/query/base';
import { EnsureUserEmailVerified } from './Guards/EnsureUserEmailVerified';
import { EnsureAuthNotAuthenticated } from './Guards/EnsureAuthNotAuthenticated';
import { EnsureUserEmailNotVerified } from './Guards/EnsureUserEmailNotVerified';
const EmailConfirmation = LazyLoader({
loader: () => import('@/containers/Authentication/EmailConfirmation'),
@@ -38,7 +39,9 @@ function AppInsider({ history }) {
<Switch>
<Route path={'/auth/register/verify'}>
<EnsureAuthenticated>
<RegisterVerify />
<EnsureUserEmailNotVerified>
<RegisterVerify />
</EnsureUserEmailNotVerified>
</EnsureAuthenticated>
</Route>