import React, { Component, ReactNode, ErrorInfo } from 'react'; import { createRoot } from 'react-dom/client'; import App from './App.tsx'; import './index.css'; interface Props { children: ReactNode; } interface State { hasError: boolean; error: Error | null; } class RootErrorBoundary extends Component { constructor(props: Props) { super(props); this.state = { hasError: false, error: null }; } static getDerivedStateFromError(error: Error): State { return { hasError: true, error }; } componentDidCatch(error: Error, errorInfo: ErrorInfo) { console.error('App Error Boundary caught an error:', error, errorInfo); } render() { if (this.state.hasError) { return (

Family Care Clinics

Ocorreu um problema momentâneo ao carregar a página. Clique abaixo para recarregar o consultório.

{this.state.error && (
                {this.state.error.message || String(this.state.error)}
              
)}
); } return this.props.children; } } try { const rootElement = document.getElementById('root'); if (rootElement) { createRoot(rootElement).render( ); } else { console.error('Root element #root not found in document'); } } catch (err) { console.error('Failed to initialize React application:', err); }