import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.jsx'
import './index.css'

// Warn on page unload if work in progress
window.addEventListener('beforeunload', e => {
  const root = document.getElementById('root');
  if (root && root._hasWork) { e.preventDefault(); e.returnValue = ''; }
});

ReactDOM.createRoot(document.getElementById('root')).render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
)
