Merge branch 'develop' into fix/completion-page
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Layout } from '@/components';
|
||||
import { AccountCreatedPage } from '@/features/authorization/routes/AccountCreatedPage';
|
||||
import { NavigateWithToast } from '@/components/NavigateWithToast';
|
||||
import {
|
||||
Calendar,
|
||||
Devices,
|
||||
@@ -16,17 +16,22 @@ import { lazy, type ReactNode } from 'react';
|
||||
import { Navigate } from 'react-router-dom';
|
||||
|
||||
const AuthenticationPage = lazy(() =>
|
||||
import('@/features/authorization').then((module) => ({
|
||||
import('@/features/authentication').then((module) => ({
|
||||
default: module.AuthenticationPage,
|
||||
})),
|
||||
);
|
||||
const AccountCreatedPage = lazy(() =>
|
||||
import('@/features/authentication').then((module) => ({
|
||||
default: module.AccountCreatedPage,
|
||||
})),
|
||||
);
|
||||
const UserCompletionPage = lazy(() =>
|
||||
import('@/features/authorization').then((module) => ({
|
||||
import('@/features/authentication').then((module) => ({
|
||||
default: module.UserCompletionPage,
|
||||
})),
|
||||
);
|
||||
const ForgetPasswordPage = lazy(() =>
|
||||
import('@/features/authorization').then((module) => ({
|
||||
import('@/features/authentication').then((module) => ({
|
||||
default: module.ForgetPasswordPage,
|
||||
})),
|
||||
);
|
||||
@@ -64,6 +69,17 @@ export interface RouteConfig {
|
||||
|
||||
// can lazy load component if needed (ex. lazy(() => import('@/features/home/routes/HomePage'));)
|
||||
export const appRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: '*',
|
||||
element: (
|
||||
<NavigateWithToast
|
||||
to="/setting/profile"
|
||||
replace
|
||||
message="messages.pageNotFound"
|
||||
severity="error"
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
element: <Navigate to="/setting/profile" replace />,
|
||||
|
||||
Reference in New Issue
Block a user