import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App'; const rootElement = document.getElementById('root'); if (!rootElement) { throw new Error("Could not find root element to mount to"); } try { const root = ReactDOM.createRoot(rootElement); root.render( ); } catch (error) { console.error('Error rendering app:', error); rootElement.innerHTML = `

Error Loading Application

${error instanceof Error ? error.message : String(error)}

Please check the browser console for more details.

`; }