import { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; import './styles/global.css'; import App from './App.jsx'; import ErrorBoundary from './components/ErrorBoundary.jsx'; const rootElement = document.getElementById('root'); if (!rootElement) { console.error('Root element not found. Ensure index.html has
'); document.body.innerHTML = '
Error: Root element not found
'; } else { try { createRoot(rootElement).render( ); } catch (error) { console.error('Failed to render React app:', error); rootElement.innerHTML = '
Error: Failed to initialize app
'; } }