import React from 'react' import ReactDOM from 'react-dom/client' import { registerSW } from 'virtual:pwa-register' import '@/i18n' import '@/index.css' import App from '@/App' import { initAuth } from '@/store/auth' // PWA: auto-update the service worker; already-loaded lessons keep working offline. registerSW({ immediate: true }) // Checks the PHP API, restores the session cookie and starts the progress sync (guest mode when // the API is not reachable). void initAuth() ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( , )