import React from 'react'; import ReactDOM from 'react-dom/client'; import App from '@/App'; import '@/index.css'; import { AuthProvider } from '@/contexts/SupabaseAuthContext'; import ErrorBoundary from '@/components/ErrorBoundary'; // Ensure the app always renders something const rootElement = document.getElementById('root'); if (!rootElement) { document.body.innerHTML = `

CyberSafe Minds

Loading application...

`; } else { try { const root = ReactDOM.createRoot(rootElement); root.render( ); } catch (error) { console.error('Failed to render app:', error); rootElement.innerHTML = `

CyberSafe Minds

There was an error loading the application.

`; } }