All files / src App.tsx

50% Statements 2/4
0% Branches 0/2
50% Functions 1/2
50% Lines 2/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39                          1x   1x                                              
import { BrowserRouter as Router } from 'react-router-dom';
import { QueryProvider } from '@/lib/query-provider';
import { useStoreDebugging } from '@/hooks/use-store-debugging';
import { AppRouter } from '@/components/app-router';
import { ErrorBoundary } from '@/components/error-boundary';
import './App.css';
import { ThemeProvider } from '@/components/theme-provider';
 
// Import performance testing (only runs in development)
import '@/lib/performance-test';
 
function App() {
  // Enable Zustand store debugging in development
  useStoreDebugging();
 
  return (
    <ErrorBoundary
      onError={(error, errorInfo) => {
        // Log errors to console in development
        if (process.env.NODE_ENV === 'development') {
          console.error('App Error:', error, errorInfo);
        }
        // In production, send to error tracking service
        // Example: Sentry.captureException(error);
      }}
    >
      <QueryProvider>
        <ThemeProvider defaultTheme="system" storageKey="ui-theme">
          <Router>
            <AppRouter />
          </Router>
        </ThemeProvider>
      </QueryProvider>
    </ErrorBoundary>
  );
}
 
export default App;