-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathRoutes.tsx
104 lines (102 loc) · 3.82 KB
/
Routes.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/* eslint-disable */
import React, { Suspense } from 'react';
import { Routes, Route, Outlet } from 'react-router-dom';
import Home from '../pages/Home';
import Header from '../components/Header';
import Footer from '../components/Footer';
import Error from './../pages/Error';
import Skeleton from '../components/Skeleton';
import UserRegister from '../pages/Organization/UserRegister';
import Message from '../pages/Organization/Message';
/* istanbul ignore next */
const OrgRegister = React.lazy(() => import('../pages/OrgRegister'));
/* istanbul ignore next */
const Orglogin = React.lazy(() => import('../pages/Organization/Orglogin'));
/* istanbul ignore next */
const ResetPassword = React.lazy(() => import('../pages/ResetPassword'));
/* istanbul ignore next */
const ForgotPassword = React.lazy(() => import('../pages/ForgotPassword'));
/* istanbul ignore next */
const Adminlogin = React.lazy(() => import('../pages/Organization/AdminLogin'));
/* istanbul ignore next */
const Pricing = React.lazy(() => import('../pages/Pricing'));
/* istanbul ignore next */
const About = React.lazy(() => import('../pages/Comingsoon'));
/* istanbul ignore next */
const Product = React.lazy(() => import('../pages/Comingsoon'));
/* istanbul ignore next */
const SignupOrgDocs = React.lazy(
() => import('../components/Docs/SignupOrgDocs'),
);
/* istanbul ignore next */
const SigninOrgDocs = React.lazy(
() => import('../components/Docs/SigninOrgDocs'),
);
const UsersDocs = React.lazy( () => import ('../components/Docs/users'),)
/* istanbul ignore next */
import Noredirect from '../pages/Noredirect';
import ProtectedRoutes from '../ProtectedRoute';
import RemoveTokenPage from '../utils/RemoveTokenPage';
import DashRoutes from '../containers/DashRoutes';
function MainRoutes() {
return (
<div className="min-h-screen page-layout">
<Suspense fallback={<Skeleton />}>
<Routes>
<Route path="/*" element={<DashRoutes />} />
<Route
path="/"
element={
<>
<Header />
<main className="page-main bg-light-bg dark:bg-dark-frame-bg">
<Outlet />
</main>
<Footer />
</>
}
>
<Route index element={<Home />} />
<Route path="/register/:token" element={<UserRegister />} />
<Route path="/register-successful" element={<Message />} />
<Route path="/signup/org" element={<OrgRegister />} />
<Route path="/signup/org/:token" element={<RemoveTokenPage />} />
<Route path="/reset-password" element={<ResetPassword />} />
<Route
path="/forgot-password/:token"
element={<ForgotPassword />}
/>
<Route
path="/login/org"
element={
<ProtectedRoutes>
<Orglogin />
</ProtectedRoutes>
}
/>
<Route
path="/users/login"
element={
<ProtectedRoutes>
<Adminlogin />
</ProtectedRoutes>
}
/>
<Route path="/pricing" element={<Pricing />} />
<Route path="/about" element={<About title={'About Page'} />} />
<Route
path="/product"
element={<Product title={'Productpage'} />}
/>
<Route path="/docs/org-signup" element={<SignupOrgDocs />} />
<Route path="/docs/org-signin" element={<SigninOrgDocs />} />
<Route path='/docs/getting-started' element={< UsersDocs />} />
<Route path="/noredirect" element={<Noredirect />} />
</Route>
<Route path="*" element={<Error />} />
</Routes>
</Suspense>
</div>
);
}
export default MainRoutes;