import { StrictMode, Component } from 'react' import type { ReactNode } from 'react' import { createRoot } from 'react-dom/client' import './index.css' import App from './App.tsx' // Global Error Boundary to catch any runtime React crash // and show a visible error message instead of a blank screen interface EBState { hasError: boolean; error: Error | null; } class ErrorBoundary extends Component<{ children: ReactNode }, EBState> { constructor(props: { children: ReactNode }) { super(props); this.state = { hasError: false, error: null }; } static getDerivedStateFromError(error: Error) { return { hasError: true, error }; } componentDidCatch(error: Error, info: any) { console.error('[QuantIQ ErrorBoundary] Caught crash:', error, info); } render() { if (this.state.hasError) { return (
⚠️

QuantIQ encountered an error

            {this.state.error?.message}
            {'\n\n'}
            {this.state.error?.stack}
          
); } return this.props.children; } } createRoot(document.getElementById('root')!).render( , )