import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';

import { GlobalErrorBoundary } from './components/GlobalErrorBoundary';

const element = document.getElementById('root');
if (!element) {
  throw new Error("Could not find root element to mount to");
}

const root = ReactDOM.createRoot(element);

root.render(
  <React.StrictMode>
    <GlobalErrorBoundary>
      <App />
    </GlobalErrorBoundary>
  </React.StrictMode>
);