2022-03-22 16:22:41 +05:30
import './ReactI18' ;
2023-11-15 15:33:45 +05:30
import 'styles.scss' ;
2021-08-26 11:50:47 +05:30
2024-02-27 16:40:29 +05:30
import * as Sentry from '@sentry/react' ;
2021-08-26 11:50:47 +05:30
import AppRoutes from 'AppRoutes' ;
2023-01-11 14:39:06 +05:30
import { ThemeProvider } from 'hooks/useDarkMode' ;
2023-11-15 16:46:20 +05:30
import ErrorBoundaryFallback from 'pages/ErrorBoundaryFallback/ErrorBoundaryFallback' ;
2023-01-13 12:01:46 +05:30
import { createRoot } from 'react-dom/client' ;
2023-11-15 16:46:20 +05:30
import { ErrorBoundary } from 'react-error-boundary' ;
2023-08-02 15:14:15 +05:30
import { HelmetProvider } from 'react-helmet-async' ;
2022-04-07 10:48:09 +05:30
import { QueryClient , QueryClientProvider } from 'react-query' ;
2021-08-26 11:50:47 +05:30
import { Provider } from 'react-redux' ;
import store from 'store' ;
2021-01-03 18:15:44 +05:30
2022-04-08 02:12:54 +05:30
const queryClient = new QueryClient ( {
defaultOptions : {
queries : {
refetchOnWindowFocus : false ,
} ,
} ,
} ) ;
2022-04-07 10:48:09 +05:30
2023-01-13 12:01:46 +05:30
const container = document . getElementById ( 'root' ) ;
2024-02-27 16:40:29 +05:30
Sentry . init ( {
dsn : process.env.SENTRY_DSN ,
tunnel : process.env.TUNNEL_URL ,
environment : 'production' ,
integrations : [
Sentry . browserTracingIntegration ( ) ,
Sentry . replayIntegration ( {
maskAllText : false ,
blockAllMedia : false ,
} ) ,
] ,
// Performance Monitoring
tracesSampleRate : 1.0 , // Capture 100% of the transactions
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
tracePropagationTargets : [ ] ,
// Session Replay
replaysSessionSampleRate : 0.1 , // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
replaysOnErrorSampleRate : 1.0 , // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
} ) ;
2023-01-13 12:01:46 +05:30
if ( container ) {
const root = createRoot ( container ) ;
root . render (
2023-11-15 16:46:20 +05:30
< ErrorBoundary FallbackComponent = { ErrorBoundaryFallback } >
< HelmetProvider >
< ThemeProvider >
< QueryClientProvider client = { queryClient } >
< Provider store = { store } >
< AppRoutes / >
< / Provider >
< / QueryClientProvider >
< / ThemeProvider >
< / HelmetProvider >
< / ErrorBoundary > ,
2023-01-13 12:01:46 +05:30
) ;
}