@@ -13,6 +13,7 @@ import Loading from "components/Loading";
13
13
import Navigation from "components/Navigation" ;
14
14
import Logo from "assets/Logo" ;
15
15
16
+ import SwrProvider from "contexts/SwrContext" ;
16
17
import ConfirmationProvider from "components/ConfirmationDialog/Provider" ;
17
18
import { AppProvider } from "contexts/AppContext" ;
18
19
import { ProjectContextProvider } from "contexts/ProjectContext" ;
@@ -56,166 +57,168 @@ export default function App() {
56
57
return (
57
58
< StyledEngineProvider injectFirst >
58
59
< ErrorBoundary >
59
- < LocalizationProvider dateAdapter = { AdapterDateFns } >
60
- < AppProvider >
61
- < Favicon />
62
- < SnackbarProvider >
63
- < ConfirmationProvider >
64
- < SnackLogProvider >
65
- < CustomBrowserRouter >
66
- < Suspense fallback = { < Loading fullScreen /> } >
67
- < Switch >
68
- < Route
69
- exact
70
- path = { routes . auth }
71
- render = { ( ) => < AuthPage /> }
72
- />
73
- < Route
74
- exact
75
- path = { routes . authSetup }
76
- render = { ( ) => < AuthSetupGuidePage /> }
77
- />
78
- < Route
79
- exact
80
- path = { routes . jwtAuth }
81
- render = { ( ) => < JwtAuthPage /> }
82
- />
83
- < Route
84
- exact
85
- path = { routes . signOut }
86
- render = { ( ) => < SignOutPage /> }
87
- />
88
- < Route
89
- exact
90
- path = { routes . signUp }
91
- render = { ( ) => < SignUpPage /> }
92
- />
93
- < Route
94
- exact
95
- path = { routes . setup }
96
- render = { ( ) => < SetupPage /> }
97
- />
98
- < Route
99
- exact
100
- path = { routes . deploy }
101
- render = { ( ) => < DeployPage /> }
102
- />
60
+ < SwrProvider >
61
+ < LocalizationProvider dateAdapter = { AdapterDateFns } >
62
+ < AppProvider >
63
+ < Favicon />
64
+ < SnackbarProvider >
65
+ < ConfirmationProvider >
66
+ < SnackLogProvider >
67
+ < CustomBrowserRouter >
68
+ < Suspense fallback = { < Loading fullScreen /> } >
69
+ < Switch >
70
+ < Route
71
+ exact
72
+ path = { routes . auth }
73
+ render = { ( ) => < AuthPage /> }
74
+ />
75
+ < Route
76
+ exact
77
+ path = { routes . authSetup }
78
+ render = { ( ) => < AuthSetupGuidePage /> }
79
+ />
80
+ < Route
81
+ exact
82
+ path = { routes . jwtAuth }
83
+ render = { ( ) => < JwtAuthPage /> }
84
+ />
85
+ < Route
86
+ exact
87
+ path = { routes . signOut }
88
+ render = { ( ) => < SignOutPage /> }
89
+ />
90
+ < Route
91
+ exact
92
+ path = { routes . signUp }
93
+ render = { ( ) => < SignUpPage /> }
94
+ />
95
+ < Route
96
+ exact
97
+ path = { routes . setup }
98
+ render = { ( ) => < SetupPage /> }
99
+ />
100
+ < Route
101
+ exact
102
+ path = { routes . deploy }
103
+ render = { ( ) => < DeployPage /> }
104
+ />
103
105
104
- < Route
105
- exact
106
- path = { "/test" }
107
- render = { ( ) => < TestPage /> }
108
- />
106
+ < Route
107
+ exact
108
+ path = { "/test" }
109
+ render = { ( ) => < TestPage /> }
110
+ />
109
111
110
- < PrivateRoute
111
- exact
112
- path = { [
113
- routes . home ,
114
- routes . tableWithId ,
115
- routes . tableGroupWithId ,
116
- routes . settings ,
117
- routes . projectSettings ,
118
- routes . userSettings ,
119
- routes . userManagement ,
120
- routes . impersonatorAuth ,
121
- routes . rowyRunTest ,
122
- ] }
123
- render = { ( ) => (
124
- < ProjectContextProvider >
125
- < Switch >
126
- < Route
127
- exact
128
- path = { routes . impersonatorAuth }
129
- render = { ( ) => < ImpersonatorAuthPage /> }
130
- />
131
- < Route
132
- exact
133
- path = { routes . rowyRunTest }
134
- render = { ( ) => < RowyRunTestPage /> }
135
- />
136
- < PrivateRoute
137
- exact
138
- path = { routes . home }
139
- render = { ( ) => (
140
- < Navigation
141
- title = "Home"
142
- titleComponent = { ( open , pinned ) =>
143
- ! ( open && pinned ) && (
144
- < Logo
145
- style = { {
146
- display : "block" ,
147
- margin : "0 auto" ,
148
- } }
149
- />
150
- )
151
- }
152
- >
153
- < HomePage />
154
- </ Navigation >
155
- ) }
156
- />
157
- < PrivateRoute
158
- path = { routes . tableWithId }
159
- render = { ( ) => < TablePage /> }
160
- />
161
- < PrivateRoute
162
- path = { routes . tableGroupWithId }
163
- render = { ( ) => < TablePage /> }
164
- />
112
+ < PrivateRoute
113
+ exact
114
+ path = { [
115
+ routes . home ,
116
+ routes . tableWithId ,
117
+ routes . tableGroupWithId ,
118
+ routes . settings ,
119
+ routes . projectSettings ,
120
+ routes . userSettings ,
121
+ routes . userManagement ,
122
+ routes . impersonatorAuth ,
123
+ routes . rowyRunTest ,
124
+ ] }
125
+ render = { ( ) => (
126
+ < ProjectContextProvider >
127
+ < Switch >
128
+ < Route
129
+ exact
130
+ path = { routes . impersonatorAuth }
131
+ render = { ( ) => < ImpersonatorAuthPage /> }
132
+ />
133
+ < Route
134
+ exact
135
+ path = { routes . rowyRunTest }
136
+ render = { ( ) => < RowyRunTestPage /> }
137
+ />
138
+ < PrivateRoute
139
+ exact
140
+ path = { routes . home }
141
+ render = { ( ) => (
142
+ < Navigation
143
+ title = "Home"
144
+ titleComponent = { ( open , pinned ) =>
145
+ ! ( open && pinned ) && (
146
+ < Logo
147
+ style = { {
148
+ display : "block" ,
149
+ margin : "0 auto" ,
150
+ } }
151
+ />
152
+ )
153
+ }
154
+ >
155
+ < HomePage />
156
+ </ Navigation >
157
+ ) }
158
+ />
159
+ < PrivateRoute
160
+ path = { routes . tableWithId }
161
+ render = { ( ) => < TablePage /> }
162
+ />
163
+ < PrivateRoute
164
+ path = { routes . tableGroupWithId }
165
+ render = { ( ) => < TablePage /> }
166
+ />
165
167
166
- < PrivateRoute
167
- exact
168
- path = { routes . settings }
169
- render = { ( ) => (
170
- < Redirect to = { routes . userSettings } />
171
- ) }
172
- />
173
- < PrivateRoute
174
- exact
175
- path = { routes . projectSettings }
176
- render = { ( ) => (
177
- < Navigation title = "Project Settings" >
178
- < ProjectSettingsPage />
179
- </ Navigation >
180
- ) }
181
- />
182
- < PrivateRoute
183
- exact
184
- path = { routes . userSettings }
185
- render = { ( ) => (
186
- < Navigation title = "Settings" >
187
- < UserSettingsPage />
188
- </ Navigation >
189
- ) }
190
- />
191
- < PrivateRoute
192
- exact
193
- path = { routes . userManagement }
194
- render = { ( ) => (
195
- < Navigation title = "User Management" >
196
- < UserManagementPage />
197
- </ Navigation >
198
- ) }
199
- />
200
- </ Switch >
201
- </ ProjectContextProvider >
202
- ) }
203
- />
168
+ < PrivateRoute
169
+ exact
170
+ path = { routes . settings }
171
+ render = { ( ) => (
172
+ < Redirect to = { routes . userSettings } />
173
+ ) }
174
+ />
175
+ < PrivateRoute
176
+ exact
177
+ path = { routes . projectSettings }
178
+ render = { ( ) => (
179
+ < Navigation title = "Project Settings" >
180
+ < ProjectSettingsPage />
181
+ </ Navigation >
182
+ ) }
183
+ />
184
+ < PrivateRoute
185
+ exact
186
+ path = { routes . userSettings }
187
+ render = { ( ) => (
188
+ < Navigation title = "Settings" >
189
+ < UserSettingsPage />
190
+ </ Navigation >
191
+ ) }
192
+ />
193
+ < PrivateRoute
194
+ exact
195
+ path = { routes . userManagement }
196
+ render = { ( ) => (
197
+ < Navigation title = "User Management" >
198
+ < UserManagementPage />
199
+ </ Navigation >
200
+ ) }
201
+ />
202
+ </ Switch >
203
+ </ ProjectContextProvider >
204
+ ) }
205
+ />
204
206
205
- < Route
206
- exact
207
- path = { routes . pageNotFound }
208
- render = { ( ) => < PageNotFound /> }
209
- />
210
- < Route render = { ( ) => < PageNotFound /> } />
211
- </ Switch >
212
- </ Suspense >
213
- </ CustomBrowserRouter >
214
- </ SnackLogProvider >
215
- </ ConfirmationProvider >
216
- </ SnackbarProvider >
217
- </ AppProvider >
218
- </ LocalizationProvider >
207
+ < Route
208
+ exact
209
+ path = { routes . pageNotFound }
210
+ render = { ( ) => < PageNotFound /> }
211
+ />
212
+ < Route render = { ( ) => < PageNotFound /> } />
213
+ </ Switch >
214
+ </ Suspense >
215
+ </ CustomBrowserRouter >
216
+ </ SnackLogProvider >
217
+ </ ConfirmationProvider >
218
+ </ SnackbarProvider >
219
+ </ AppProvider >
220
+ </ LocalizationProvider >
221
+ </ SwrProvider >
219
222
</ ErrorBoundary >
220
223
</ StyledEngineProvider >
221
224
) ;
0 commit comments