import {lazy, FC, Suspense} from 'react' import {Route, Routes, Navigate} from 'react-router-dom' import {MasterLayout} from '../../_digifi/layout/MasterLayout' import TopBarProgress from 'react-topbar-progress-indicator' import {DashboardWrapper} from '../pages/dashboard/DashboardWrapper' import {MenuTestPage} from '../pages/MenuTestPage' import {getCSSVariableValue} from '../../_digifi/assets/ts/_utils' import {WithChildren} from '../../_digifi/helpers' import BuilderPageWrapper from '../pages/layout-builder/BuilderPageWrapper' const PrivateRoutes = () => { const ProcessPage = lazy(() => import('../modules/process/ProcessPage')) const WizardsPage = lazy(() => import('../modules/wizards/WizardsPage')) const AccountPage = lazy(() => import('../modules/accounts/AccountPage')) const WidgetsPage = lazy(() => import('../modules/widgets/WidgetsPage')) const ChatPage = lazy(() => import('../modules/apps/chat/ChatPage')) const UsersPage = lazy(() => import('../modules/apps/user-management/UsersPage')) return ( }> {/* Redirect to Dashboard after success login/registartion */} } /> {/* Pages */} } /> } /> } /> {/* Lazy Modules */} } /> } /> } /> } /> } /> } /> {/* Page Not Found */} } /> ) } const SuspensedView: FC = ({children}) => { const baseColor = getCSSVariableValue('--bs-primary') TopBarProgress.config({ barColors: { '0': baseColor, }, barThickness: 1, shadowBlur: 5, }) return }>{children} } export {PrivateRoutes}