import React from "react";
import ReactDOM from "react-dom/client";
import './styles/styles.css';
import App from "./components/app";

const root = ReactDOM.createRoot(document.getElementById("root"));
// Global error handlers to surface full error objects for debugging in the browser console
window.addEventListener('error', (event) => {
    // event.error may be an Error instance or any thrown value
    console.error('Global error event:', event.error ?? event.message ?? event);
});
window.addEventListener('unhandledrejection', (event) => {
    console.error('Unhandled promise rejection:', event.reason);
});
root.render(
    <React.StrictMode>
        <div className="min-h-screen flex flex-col bg-slate-50 font-sans text-slate-800 antialiased overflow-x-hidden w-full">
            <App />
        </div>
    </React.StrictMode>
);