import {StrictMode, Component, ErrorInfo, ReactNode} from 'react'; import {createRoot} from 'react-dom/client'; import App from './App.tsx'; import './index.css'; class ErrorBoundary extends Component<{children: ReactNode}, {hasError: boolean, error: Error | null}> { constructor(props: {children: ReactNode}) { super(props); this.state = { hasError: false, error: null }; } static getDerivedStateFromError(error: Error) { return { hasError: true, error }; } componentDidCatch(error: Error, errorInfo: ErrorInfo) { console.error("Uncaught error:", error, errorInfo); } render() { if (this.state.hasError) { return (
Please check the console (F12) for more details.
{this.state.error?.toString()}