1
- import { useMemo , useState } from 'react' ;
1
+ import { useState } from 'react' ;
2
2
import { createBrowserRouter , RouterProvider } from 'react-router-dom' ;
3
3
import { wrapCreateBrowserRouterV6 } from '@sentry/react' ;
4
4
import { ReactQueryDevtools } from '@tanstack/react-query-devtools' ;
5
5
6
6
import { AppQueryClientProvider } from 'sentry/appQueryClient' ;
7
- import { TrackingContextProvider } from 'sentry/components/core/trackingContext' ;
8
7
import { OnboardingContextProvider } from 'sentry/components/onboarding/onboardingContext' ;
9
8
import { ThemeAndStyleProvider } from 'sentry/components/themeAndStyleProvider' ;
10
9
import { USE_REACT_QUERY_DEVTOOL } from 'sentry/constants' ;
11
10
import { routes } from 'sentry/routes' ;
12
- import HookStore from 'sentry/stores/hookStore ' ;
11
+ import { SentryTrackingProvider } from 'sentry/tracking ' ;
13
12
import { DANGEROUS_SET_REACT_ROUTER_6_HISTORY } from 'sentry/utils/browserHistory' ;
14
13
15
14
import { buildReactRouter6Routes } from './utils/reactRouter6Compat/router' ;
@@ -24,16 +23,14 @@ function buildRouter() {
24
23
25
24
function Main ( ) {
26
25
const [ router ] = useState ( buildRouter ) ;
27
- const useButtonTracking = HookStore . get ( 'react-hook:use-button-tracking' ) [ 0 ] ;
28
- const trackingContextValue = useMemo ( ( ) => ( { useButtonTracking} ) , [ useButtonTracking ] ) ;
29
26
30
27
return (
31
28
< AppQueryClientProvider >
32
29
< ThemeAndStyleProvider >
33
30
< OnboardingContextProvider >
34
- < TrackingContextProvider value = { trackingContextValue } >
31
+ < SentryTrackingProvider >
35
32
< RouterProvider router = { router } />
36
- </ TrackingContextProvider >
33
+ </ SentryTrackingProvider >
37
34
</ OnboardingContextProvider >
38
35
{ USE_REACT_QUERY_DEVTOOL && (
39
36
< ReactQueryDevtools initialIsOpen = { false } buttonPosition = "bottom-left" />
0 commit comments