process page added
This commit was merged in pull request #38.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
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 { 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 { getCSSVariableValue } from "../../_digifi/assets/ts/_utils";
|
||||
import { WithChildren } from "../../_digifi/helpers";
|
||||
// import BuilderPageWrapper from '../pages/layout-builder/BuilderPageWrapper'
|
||||
|
||||
const PrivateRoutes = () => {
|
||||
@@ -13,28 +13,43 @@ const PrivateRoutes = () => {
|
||||
// const AccountPage = lazy(() => import('../modules/accounts/AccountPage'))
|
||||
// const WidgetsPage = lazy(() => import('../modules/widgets/WidgetsPage'))
|
||||
// const ChatPage = lazy(() => import('../modules/apps/chat/ChatPage'))
|
||||
const ProcessPage = lazy(() => import('../modules/process/ProcessPage'))
|
||||
const UsersPage = lazy(() => import('../modules/apps/user-management/UsersPage'))
|
||||
const EmployersPage =lazy(() => import('../modules/employers/employers-list/UsersPage'))
|
||||
const ProcessPage = lazy(() => import("../modules/process/ProcessPage"));
|
||||
const UsersPage = lazy(
|
||||
() => import("../modules/apps/user-management/UsersPage")
|
||||
);
|
||||
const EmployersPage = lazy(
|
||||
() => import("../modules/employers/employers-list/UsersPage")
|
||||
);
|
||||
const ApproveRejectRoutes = lazy(
|
||||
() => import("../modules/process/approve-reject-page/ApproveRejectRoutes")
|
||||
);
|
||||
|
||||
return (
|
||||
<Routes>
|
||||
<Route element={<MasterLayout />}>
|
||||
{/* Redirect to Dashboard after success login/registartion */}
|
||||
<Route path='auth/*' element={<Navigate to='/dashboard' />} />
|
||||
<Route path="auth/*" element={<Navigate to="/dashboard" />} />
|
||||
{/* Pages */}
|
||||
<Route path='dashboard' element={<DashboardWrapper />} />
|
||||
<Route path="dashboard" element={<DashboardWrapper />} />
|
||||
{/* <Route path='builder' element={<BuilderPageWrapper />} /> */}
|
||||
{/* <Route path='menu-test' element={<MenuTestPage />} /> */}
|
||||
{/* Lazy Modules */}
|
||||
<Route
|
||||
path='loan/pages/process/*'
|
||||
path="loan/pages/process/*"
|
||||
element={
|
||||
<SuspensedView>
|
||||
<ProcessPage />
|
||||
</SuspensedView>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="loan/verified/*"
|
||||
element={
|
||||
<SuspensedView>
|
||||
<ApproveRejectRoutes />
|
||||
</SuspensedView>
|
||||
}
|
||||
/>
|
||||
{/* <Route
|
||||
path='crafted/pages/wizards/*'
|
||||
element={
|
||||
@@ -68,7 +83,7 @@ const PrivateRoutes = () => {
|
||||
}
|
||||
/> */}
|
||||
<Route
|
||||
path='tools/user-management/*'
|
||||
path="tools/user-management/*"
|
||||
element={
|
||||
<SuspensedView>
|
||||
<UsersPage />
|
||||
@@ -76,7 +91,7 @@ const PrivateRoutes = () => {
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path='/employers/*'
|
||||
path="/employers/*"
|
||||
element={
|
||||
<SuspensedView>
|
||||
<EmployersPage />
|
||||
@@ -84,22 +99,22 @@ const PrivateRoutes = () => {
|
||||
}
|
||||
/>
|
||||
{/* Page Not Found */}
|
||||
<Route path='*' element={<Navigate to='/error/404' />} />
|
||||
<Route path="*" element={<Navigate to="/error/404" />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
const SuspensedView: FC<WithChildren> = ({children}) => {
|
||||
const baseColor = getCSSVariableValue('--bs-primary')
|
||||
const SuspensedView: FC<WithChildren> = ({ children }) => {
|
||||
const baseColor = getCSSVariableValue("--bs-primary");
|
||||
TopBarProgress.config({
|
||||
barColors: {
|
||||
'0': baseColor,
|
||||
"0": baseColor,
|
||||
},
|
||||
barThickness: 1,
|
||||
shadowBlur: 5,
|
||||
})
|
||||
return <Suspense fallback={<TopBarProgress />}>{children}</Suspense>
|
||||
}
|
||||
});
|
||||
return <Suspense fallback={<TopBarProgress />}>{children}</Suspense>;
|
||||
};
|
||||
|
||||
export {PrivateRoutes}
|
||||
export { PrivateRoutes };
|
||||
|
||||
Reference in New Issue
Block a user