import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.tsx' import { ErrorBoundary } from './components/ErrorBoundary.tsx' import './index.css' // eslint-disable-next-line no-console console.log('[SAP Sync] React mounting...') try { const rootElement = document.getElementById('root') if (!rootElement) { throw new Error('Root element #root not found in DOM') } const root = ReactDOM.createRoot(rootElement) root.render( , ) // eslint-disable-next-line no-console console.log('[SAP Sync] React mounted successfully') } catch (error) { console.error('[SAP Sync] Failed to mount React:', error) const errorMsg = error instanceof Error ? error.message : String(error) document.body.innerHTML = [ '
', '
', '

Application Failed to Load

', '

There was a critical error starting the application.

', '
' + errorMsg + '
', '', '
' ].join('') }