feat: split the preferences pages

This commit is contained in:
Ahmed Bouhuolia
2024-08-29 20:49:08 +02:00
parent c9fe6d9b37
commit af284f3f6d
7 changed files with 888 additions and 85 deletions

View File

@@ -1,43 +1,35 @@
// @ts-nocheck
import LazyLoader from '@/components/LazyLoader';
import { lazy } from 'react';
const BASE_URL = '/auth';
export default [
{
path: `${BASE_URL}/login`,
component: LazyLoader({
loader: () => import('@/containers/Authentication/Login'),
}),
component: lazy(() => import('@/containers/Authentication/Login')),
},
{
path: `${BASE_URL}/send_reset_password`,
component: LazyLoader({
loader: () => import('@/containers/Authentication/SendResetPassword'),
}),
component: lazy(
() => import('@/containers/Authentication/SendResetPassword'),
),
},
{
path: `${BASE_URL}/reset_password/:token`,
component: LazyLoader({
loader: () => import('@/containers/Authentication/ResetPassword'),
}),
component: lazy(() => import('@/containers/Authentication/ResetPassword')),
},
{
path: `${BASE_URL}/invite/:token/accept`,
component: LazyLoader({
loader: () => import('@/containers/Authentication/InviteAccept'),
}),
component: lazy(() => import('@/containers/Authentication/InviteAccept')),
},
{
path: `${BASE_URL}/register/email_confirmation`,
component: LazyLoader({
loader: () => import('@/containers/Authentication/EmailConfirmation'),
}),
component: lazy(
() => import('@/containers/Authentication/EmailConfirmation'),
),
},
{
path: `${BASE_URL}/register`,
component: LazyLoader({
loader: () => import('@/containers/Authentication/Register'),
}),
component: lazy(() => import('@/containers/Authentication/Register')),
},
];

View File

@@ -3,7 +3,7 @@ import { lazy } from 'react';
const BASE_URL = '/preferences';
export default [
export const getPreferenceRoutes = () => [
{
path: `${BASE_URL}/general`,
component: lazy(() => import('@/containers/Preferences/General/General')),