import { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; import App from './App.tsx'; import { ErrorBoundary } from './components/ErrorBoundary'; import './index.css'; function mount() { let rootElement = document.getElementById('root'); if (!rootElement) { rootElement = document.createElement('div'); rootElement.id = 'root'; document.body.appendChild(rootElement); } createRoot(rootElement).render( ); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', mount); } else { mount(); }