import React, { Component, ErrorInfo, ReactNode } from 'react'; import ReactDOM from 'react-dom/client'; import App from './App'; import './themes/animations.css'; import './index.css'; import './context/i18n'; interface Props { children: ReactNode; } interface State { hasError: boolean; error: Error | null; } class RootErrorBoundary extends Component { public state: State = { hasError: false, error: null }; public static getDerivedStateFromError(error: Error): State { return { hasError: true, error }; } public componentDidCatch(error: Error, errorInfo: ErrorInfo) { console.error('CRITICAL UNCAUGHT ERROR:', error, errorInfo); } public render() { if (this.state.hasError) { return (

⚠️ Runtime Startup Error

{this.state.error?.stack || this.state.error?.message}
); } return this.props.children; } } const rootElement = document.getElementById('root'); if (rootElement) { ReactDOM.createRoot(rootElement).render( ); }