Commit b2c902b
authored
Migrate react-router from declarative mode to data mode (#13534)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Migrates routing from declarative `<Routes>` in `App` to React
Router’s data router for better code-splitting and structure.
>
> - Introduces `createRoutes` in `app/routes.tsx` with a `RootLayout`
wrapping providers and `CoinflowPurchaseProtection`; sets navigation ref
via `NavigationSetup`
> - Replaces `BrowserRouter/HashRouter` with
`createBrowserRouter`/`createHashRouter` and `RouterProvider` in
`AppProviders`; `App` now just returns `<AppProviders />`
> - Ports `web-player/WebPlayer` to TypeScript and refactors route
definitions to be lazy-loaded; maintains mobile/desktop route
differences, redirects, and update banners
> - Converts `pages/modals/AppModal` to default export and updates
imports; `AnimatedSwitch` returns a React fragment wrapper;
`HeaderContextConsumer` now returns `null` unless header is a valid
element
> - Cleans `tsconfig.json` excludes (remove storybook-specific excludes)
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
819533a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 4caf103 commit b2c902b
File tree
10 files changed
+1841
-1286
lines changed- packages/web
- src
- app
- web-player
- components
- animated-switch
- header/mobile
- pages/modals
10 files changed
+1841
-1286
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 2 | + | |
13 | 3 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 4 | | |
36 | 5 | | |
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 | | - | |
| 6 | + | |
104 | 7 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 15 | | |
18 | | - | |
19 | 16 | | |
20 | | - | |
21 | 17 | | |
22 | 18 | | |
23 | | - | |
24 | 19 | | |
25 | 20 | | |
26 | | - | |
27 | | - | |
28 | 21 | | |
29 | | - | |
| 22 | + | |
30 | 23 | | |
31 | 24 | | |
32 | | - | |
| 25 | + | |
33 | 26 | | |
34 | 27 | | |
35 | 28 | | |
| |||
53 | 46 | | |
54 | 47 | | |
55 | 48 | | |
56 | | - | |
57 | | - | |
58 | 49 | | |
59 | 50 | | |
60 | | - | |
61 | | - | |
62 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
63 | 57 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
80 | 62 | | |
81 | 63 | | |
82 | 64 | | |
83 | 65 | | |
84 | 66 | | |
85 | 67 | | |
86 | 68 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 69 | + | |
114 | 70 | | |
115 | 71 | | |
116 | 72 | | |
| |||
0 commit comments