AgenticIQ/src/main.tsx

33 lines
863 B
TypeScript

/**
* Application entry point
* @description Bootstraps the React application with providers
*/
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { QueryClientProvider } from '@tanstack/react-query';
import { queryClient } from '@/lib/query-client';
import App from './App';
import './index.css';
/**
* Root element for React application
*/
const rootElement = document.getElementById('root');
if (!rootElement) {
throw new Error('Root element not found. Ensure index.html contains a div with id="root".');
}
/**
* Renders the application with all required providers
* @description Wraps App with StrictMode and QueryClientProvider
*/
createRoot(rootElement).render(
<StrictMode>
<QueryClientProvider client={queryClient}>
<App />
</QueryClientProvider>
</StrictMode>
);