-
-
Notifications
You must be signed in to change notification settings - Fork 209
/
index.tsx
59 lines (57 loc) · 1.58 KB
/
index.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
import type { RouteObject } from "react-router-dom";
import { RouteQueryLoader } from "../../utils/Loader";
const getAboutRoutes = (): RouteObject[] => {
const routes = [
{
path: "/",
lazy: async () => {
const AboutLayout = await import("../layout");
return { Component: AboutLayout.default };
},
children: [
{
path: "about/",
lazy: async () => {
const About = await import("../About");
return { Component: About.default };
},
},
{
path: "add-data/",
lazy: async () => {
const AddData = await import("../add-data/AddData");
return { Component: AddData.default };
},
},
{
path: "current-status/",
loader: RouteQueryLoader("current-status"),
lazy: async () => {
const CurrentStatus = await import(
"../current-status/CurrentStatus"
);
return { Component: CurrentStatus.default };
},
},
{
path: "data/",
lazy: async () => {
const Data = await import("../data/Data");
return { Component: Data.default };
},
},
{
path: "terms-of-service/",
lazy: async () => {
const TermsOfService = await import(
"../terms-of-service/TermsOfService"
);
return { Component: TermsOfService.default };
},
},
],
},
];
return routes;
};
export default getAboutRoutes;