import { createRoot } from "react-dom/client"; import App from "./App"; import "./index.css"; import "./scss/style.scss"; import { initI18n } from "./i18n"; const rootEl = document.getElementById("root"); if (!rootEl) { throw new Error("Root element #root not found"); } initI18n() .then(() => { createRoot(rootEl).render(); }) .catch((err: unknown) => { console.error("Failed to initialize app:", err); rootEl.innerHTML = `

Failed to load

${err instanceof Error ? err.message : "Unknown error"}

`; });