import React from 'react';
import ReactDOM from 'react-dom/client';
import { initKeycloak } from './authProvider';
import App from './App';

async function bootstrap() {
  try {
    await initKeycloak();
    ReactDOM.createRoot(document.getElementById('root')!).render(
      <React.StrictMode>
        <App />
      </React.StrictMode>
    );
  } catch (error) {
    console.error('Failed to initialize Keycloak:', error);
  }
}

bootstrap();