import { StrictMode } from 'react' import { createRoot } from 'react-dom/client' import { AuthProvider } from '@khalidadil/auth-manager' import '@khalidadil/auth-manager/styles.css' import './index.css' import App from './AppRouter' // v0.8 — wraps the whole tree so useCustomer/useAdmin hooks // share a single /api/auth/me fetch instead of each call site re-fetching. // AuthProvider degrades gracefully if /api/auth/me returns 404 (host // running without DATABASE_URL set), so this wrap is safe even when // auth-manager is disabled server-side. // // SW registration lives inside via the `useRegisterSW` // hook — we removed the hand-rolled `navigator.serviceWorker.ready` // listener that used to live here. createRoot(document.getElementById('root')).render( , )