forked from StellarSplit/StellarSplit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tsx
More file actions
89 lines (86 loc) · 2.62 KB
/
Copy pathmain.tsx
File metadata and controls
89 lines (86 loc) · 2.62 KB
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
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import "./index.css";
import HomePage from "./pages/Home";
import RootLayout from "./layouts/RootLayout";
import { WalletProvider } from "./hooks/use-wallet";
import { ThemeProvider } from "./components/ThemeContex";
import { CollaborationProvider } from "./components/Collaboration";
import "./i18n/config";
const router = createBrowserRouter([
{
path: "/",
element: <RootLayout />,
children: [
{ index: true, element: <HomePage /> },
{
path: "/dashboard",
lazy: async () => {
const { default: Dashboard } = await import("./pages/Dashboard");
return { Component: Dashboard };
},
},
{
path: "/split/:id",
lazy: async () => {
const { SplitDetailPage } = await import("./pages/SplitView/SplitDetailPage");
return { Component: SplitDetailPage };
},
},
{
path: "/analytics",
lazy: async () => {
const { default: AnalyticsDashboard } = await import("./pages/AnalyticsDashboard");
return { Component: AnalyticsDashboard };
},
},
{
path: "/split-groups",
lazy: async () => {
const { default: SplitGroup } = await import("./pages/SplitGroup");
return { Component: SplitGroup };
},
},
{
path: "/history",
lazy: async () => {
const { default: SplitHistoryPage } = await import("./pages/SplitHistoryPage");
return { Component: SplitHistoryPage };
},
},
{
path: "/pay",
lazy: async () => {
const { default: PaymentURIPage } = await import("./pages/PaymentURIPage");
return { Component: PaymentURIPage };
},
},
{
path: "/create-split",
lazy: async () => {
const { SplitCreationWizard } = await import("./components/SplitWizard");
return { Component: SplitCreationWizard };
},
},
{
path: "/notifications",
lazy: async () => {
const { default: NotificationCenterPage } = await import("./pages/NotificationCenterPage");
return { Component: NotificationCenterPage };
},
},
],
},
]);
createRoot(document.getElementById("root")!).render(
<StrictMode>
<ThemeProvider>
<WalletProvider>
<CollaborationProvider>
<RouterProvider router={router} />
</CollaborationProvider>
</WalletProvider>
</ThemeProvider>
</StrictMode>,
);