import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; import "./index.css"; import "./lib/i18n/index.js"; // initialize i18next before the app renders import { App } from "./App.js"; import { ErrorBoundary } from "./lib/ErrorBoundary.js"; import { installClientLogging } from "./lib/logger.js"; import { installKioskGuards } from "./lib/kiosk.js"; import { checkForDesktopUpdate } from "./lib/desktop-updater.js"; import i18n from "./lib/i18n/index.js"; // Capture uncaught errors / rejections / console noise → backend log store, before // the app mounts so even an early crash is reported. See lib/logger.ts. installClientLogging(); // Block the right-click context menu in prod builds (dev keeps it + devtools). installKioskGuards(); // Desktop only: check for a signed update on launch and, if one exists, ask the // operator before installing + relaunching. No-op in the browser / when offline. void checkForDesktopUpdate(({ version }) => Promise.resolve(window.confirm(i18n.t("update.prompt", { version }))), ); const rootEl = document.getElementById("root"); if (!rootEl) throw new Error("root element not found"); createRoot(rootEl).render( , );