mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 08:11:13 -05:00
Fix: Cronitor RUM history patching error
This commit is contained in:
26
src/App.tsx
26
src/App.tsx
@@ -131,6 +131,17 @@ function NavigationTracker() {
|
||||
}
|
||||
|
||||
function AppContent(): React.JSX.Element {
|
||||
// Initialize Cronitor RUM inside BrowserRouter (where history is available)
|
||||
useEffect(() => {
|
||||
Cronitor.load("0b5d17d3f7625ce8766c2c4c85c1895d", {
|
||||
debug: import.meta.env.DEV, // Enable debug logs in development only
|
||||
trackMode: 'history', // Automatically track page views with React Router
|
||||
});
|
||||
|
||||
// Log successful initialization
|
||||
console.log('[Cronitor] RUM initialized');
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<TooltipProvider>
|
||||
<NavigationTracker />
|
||||
@@ -388,19 +399,7 @@ function AppContent(): React.JSX.Element {
|
||||
);
|
||||
}
|
||||
|
||||
const App = (): React.JSX.Element => {
|
||||
// Initialize Cronitor RUM on app mount
|
||||
useEffect(() => {
|
||||
Cronitor.load("0b5d17d3f7625ce8766c2c4c85c1895d", {
|
||||
debug: import.meta.env.DEV, // Enable debug logs in development only
|
||||
trackMode: 'history', // Automatically track page views with React Router
|
||||
});
|
||||
|
||||
// Log successful initialization
|
||||
console.log('[Cronitor] RUM initialized');
|
||||
}, []);
|
||||
|
||||
return (
|
||||
const App = (): React.JSX.Element => (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<AuthProvider>
|
||||
<AuthModalProvider>
|
||||
@@ -415,6 +414,5 @@ const App = (): React.JSX.Element => {
|
||||
<AnalyticsWrapper />
|
||||
</QueryClientProvider>
|
||||
);
|
||||
};
|
||||
|
||||
export default App;
|
||||
|
||||
Reference in New Issue
Block a user