@@ -33,6 +33,7 @@ import { TemplateFormProvider } from './components/templates/TemplateFormProvide
3333import { SpotLight } from './components/utils/Spotlight' ;
3434import { SpotlightContext , SpotlightItem } from './store/spotlightContext' ;
3535import { LinkVercelProjectPage } from './pages/partner-integrations/LinkVercelProjectPage' ;
36+ import { SegmentProvider } from './store/segment.context' ;
3637
3738if ( SENTRY_DSN ) {
3839 Sentry . init ( {
@@ -68,162 +69,164 @@ applyToken(tokenStoredToken);
6869
6970function App ( ) {
7071 return (
71- < HelmetProvider >
72- < BrowserRouter basename = { CONTEXT_PATH } >
73- < QueryClientProvider client = { queryClient } >
74- < AuthHandlerComponent >
75- < ThemeHandlerComponent >
76- < SpotLightProvider >
77- < Routes >
78- < Route path = "/auth/signup" element = { < SignUpPage /> } />
79- < Route path = "/auth/login" element = { < LoginPage /> } />
80- < Route path = "/auth/reset/request" element = { < PasswordResetPage /> } />
81- < Route path = "/auth/reset/:token" element = { < PasswordResetPage /> } />
82- < Route path = "/auth/invitation/:token" element = { < InvitationPage /> } />
83- < Route path = "/auth/application" element = { < CreateOrganizationPage /> } />
84- < Route
85- path = "/partner-integrations/vercel/link-projects"
86- element = {
87- < RequiredAuth >
88- < LinkVercelProjectPage type = "create" />
89- </ RequiredAuth >
90- }
91- />
92- < Route
93- path = "/partner-integrations/vercel/link-projects/edit"
94- element = {
95- < RequiredAuth >
96- < LinkVercelProjectPage type = "edit" />
97- </ RequiredAuth >
98- }
99- />
100- < Route element = { < AppLayout /> } >
72+ < SegmentProvider >
73+ < HelmetProvider >
74+ < BrowserRouter basename = { CONTEXT_PATH } >
75+ < QueryClientProvider client = { queryClient } >
76+ < AuthHandlerComponent >
77+ < ThemeHandlerComponent >
78+ < SpotLightProvider >
79+ < Routes >
80+ < Route path = "/auth/signup" element = { < SignUpPage /> } />
81+ < Route path = "/auth/login" element = { < LoginPage /> } />
82+ < Route path = "/auth/reset/request" element = { < PasswordResetPage /> } />
83+ < Route path = "/auth/reset/:token" element = { < PasswordResetPage /> } />
84+ < Route path = "/auth/invitation/:token" element = { < InvitationPage /> } />
85+ < Route path = "/auth/application" element = { < CreateOrganizationPage /> } />
10186 < Route
102- path = "/* "
87+ path = "/partner-integrations/vercel/link-projects "
10388 element = {
10489 < RequiredAuth >
105- < SpotLight >
106- < HomePage />
107- </ SpotLight >
90+ < LinkVercelProjectPage type = "create" />
10891 </ RequiredAuth >
10992 }
11093 />
11194 < Route
112- path = "/templates/create "
95+ path = "/partner-integrations/vercel/link-projects/edit "
11396 element = {
11497 < RequiredAuth >
115- < TemplateFormProvider >
116- < TemplateEditorProvider >
117- < SpotLight >
118- < TemplateEditorPage />
119- </ SpotLight >
120- </ TemplateEditorProvider >
121- </ TemplateFormProvider >
98+ < LinkVercelProjectPage type = "edit" />
12299 </ RequiredAuth >
123100 }
124101 />
125- < Route
126- path = "/templates/edit/:templateId"
127- element = {
128- < RequiredAuth >
129- < TemplateFormProvider >
130- < TemplateEditorProvider >
131- < SpotLight >
132- < TemplateEditorPage />
133- </ SpotLight >
134- </ TemplateEditorProvider >
135- </ TemplateFormProvider >
136- </ RequiredAuth >
137- }
138- />
139- < Route
140- path = "/templates"
141- element = {
142- < RequiredAuth >
143- < SpotLight >
144- < NotificationList />
145- </ SpotLight >
146- </ RequiredAuth >
147- }
148- />
149- < Route
150- path = "/quickstart"
151- element = {
152- < RequiredAuth >
153- < SpotLight >
154- < QuickStartPage />
155- </ SpotLight >
156- </ RequiredAuth >
157- }
158- />
159- < Route
160- path = "/activities"
161- element = {
162- < RequiredAuth >
163- < SpotLight >
164- < ActivitiesPage />
165- </ SpotLight >
166- </ RequiredAuth >
167- }
168- />
169- < Route
170- path = "/settings"
171- element = {
172- < RequiredAuth >
173- < SpotLight >
174- < SettingsPage />
175- </ SpotLight >
176- </ RequiredAuth >
177- }
178- />
179- < Route
180- path = "/integrations"
181- element = {
182- < RequiredAuth >
183- < SpotLight >
184- < IntegrationsStore />
185- </ SpotLight >
186- </ RequiredAuth >
187- }
188- />
189- < Route
190- path = "/team"
191- element = {
192- < RequiredAuth >
193- < SpotLight >
194- < MembersInvitePage />
195- </ SpotLight >
196- </ RequiredAuth >
197- }
198- />
199- < Route
200- path = "/changes"
201- element = {
202- < RequiredAuth >
203- < SpotLight >
204- < PromoteChangesPage />
205- </ SpotLight >
206- </ RequiredAuth >
207- }
208- />
209- < Route
210- path = "/subscribers"
211- element = {
212- < RequiredAuth >
213- < SpotLight >
214- < SubscribersList />
215- </ SpotLight >
216- </ RequiredAuth >
217- }
218- />
219- </ Route >
220- </ Routes >
221- </ SpotLightProvider >
222- </ ThemeHandlerComponent >
223- </ AuthHandlerComponent >
224- </ QueryClientProvider >
225- </ BrowserRouter >
226- </ HelmetProvider >
102+ < Route element = { < AppLayout /> } >
103+ < Route
104+ path = "/*"
105+ element = {
106+ < RequiredAuth >
107+ < SpotLight >
108+ < HomePage />
109+ </ SpotLight >
110+ </ RequiredAuth >
111+ }
112+ />
113+ < Route
114+ path = "/templates/create"
115+ element = {
116+ < RequiredAuth >
117+ < TemplateFormProvider >
118+ < TemplateEditorProvider >
119+ < SpotLight >
120+ < TemplateEditorPage />
121+ </ SpotLight >
122+ </ TemplateEditorProvider >
123+ </ TemplateFormProvider >
124+ </ RequiredAuth >
125+ }
126+ />
127+ < Route
128+ path = "/templates/edit/:templateId"
129+ element = {
130+ < RequiredAuth >
131+ < TemplateFormProvider >
132+ < TemplateEditorProvider >
133+ < SpotLight >
134+ < TemplateEditorPage />
135+ </ SpotLight >
136+ </ TemplateEditorProvider >
137+ </ TemplateFormProvider >
138+ </ RequiredAuth >
139+ }
140+ />
141+ < Route
142+ path = "/templates"
143+ element = {
144+ < RequiredAuth >
145+ < SpotLight >
146+ < NotificationList />
147+ </ SpotLight >
148+ </ RequiredAuth >
149+ }
150+ />
151+ < Route
152+ path = "/quickstart"
153+ element = {
154+ < RequiredAuth >
155+ < SpotLight >
156+ < QuickStartPage />
157+ </ SpotLight >
158+ </ RequiredAuth >
159+ }
160+ />
161+ < Route
162+ path = "/activities"
163+ element = {
164+ < RequiredAuth >
165+ < SpotLight >
166+ < ActivitiesPage />
167+ </ SpotLight >
168+ </ RequiredAuth >
169+ }
170+ />
171+ < Route
172+ path = "/settings"
173+ element = {
174+ < RequiredAuth >
175+ < SpotLight >
176+ < SettingsPage />
177+ </ SpotLight >
178+ </ RequiredAuth >
179+ }
180+ />
181+ < Route
182+ path = "/integrations"
183+ element = {
184+ < RequiredAuth >
185+ < SpotLight >
186+ < IntegrationsStore />
187+ </ SpotLight >
188+ </ RequiredAuth >
189+ }
190+ />
191+ < Route
192+ path = "/team"
193+ element = {
194+ < RequiredAuth >
195+ < SpotLight >
196+ < MembersInvitePage />
197+ </ SpotLight >
198+ </ RequiredAuth >
199+ }
200+ />
201+ < Route
202+ path = "/changes"
203+ element = {
204+ < RequiredAuth >
205+ < SpotLight >
206+ < PromoteChangesPage />
207+ </ SpotLight >
208+ </ RequiredAuth >
209+ }
210+ />
211+ < Route
212+ path = "/subscribers"
213+ element = {
214+ < RequiredAuth >
215+ < SpotLight >
216+ < SubscribersList />
217+ </ SpotLight >
218+ </ RequiredAuth >
219+ }
220+ />
221+ </ Route >
222+ </ Routes >
223+ </ SpotLightProvider >
224+ </ ThemeHandlerComponent >
225+ </ AuthHandlerComponent >
226+ </ QueryClientProvider >
227+ </ BrowserRouter >
228+ </ HelmetProvider >
229+ </ SegmentProvider >
227230 ) ;
228231}
229232
0 commit comments