import React, { StrictMode, Component, ReactNode, ErrorInfo } from 'react'; import { createRoot } from 'react-dom/client'; import App from './App.tsx'; import { AuthProvider } from './context/AuthContext'; import './index.css'; interface Props { children: ReactNode; } interface State { hasError: boolean; error: Error | null; } class ErrorBoundary 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('Uncaught error in FlowCraft:', error, errorInfo); } public render() { if (this.state.hasError) { return (

Restableciendo Lienzo

Ocurrió un inconveniente al cargar el estado. Puedes reiniciar el lienzo para volver al estado inicial seguro.

{this.state.error && (
                {this.state.error.message}
              
)}
); } return this.props.children; } } createRoot(document.getElementById('root')!).render( );