-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathApp.tsx
43 lines (40 loc) · 1.34 KB
/
App.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
import React, { lazy, Suspense } from "react";
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
import { AppLoader } from "./components/progress/AppLoader";
import { ImportantInfoModal } from "./features/ui/ImportantInfoModal";
import { SystemMonitor } from "./features/ui/SystemMonitor";
// import { SystemMonitor } from "./features/ui/SystemMonitor";
import { NotFoundPage } from "./pages/NotFoundPage";
import { paths } from "./pages/routes";
// const MainPage = lazy(() => import("./pages/MainPage"));
const AboutPage = lazy(() => import("./pages/AboutPage"));
const FtxPage = lazy(() => import("./pages/FtxPage"));
const mainPagePaths = [
paths.HOME,
paths.MINT,
paths.MINT__GATEWAY_STANDARD,
paths.MINT__GATEWAY_H2H,
paths.BRIDGE,
paths.BRIDGE_GATEWAY,
paths.RELEASE,
paths.RELEASE__GATEWAY_STANDARD,
paths.RELEASE__GATEWAY_H2H,
paths.TEST,
];
function App() {
return (
<Router>
<Suspense fallback={<AppLoader />}>
<Switch>
<Route exact path={paths.WELCOME} component={FtxPage} />
<Route exact path={paths.ABOUT} component={AboutPage} />
<Route path={mainPagePaths} component={FtxPage} />
<Route component={NotFoundPage} />
</Switch>
<ImportantInfoModal />
<SystemMonitor />
</Suspense>
</Router>
);
}
export default App;