import { StrictMode } from "react" import { createRoot, hydrateRoot } from "react-dom/client" import App from "./App.tsx" // oxlint-disable-next-line import/no-unassigned-import -- The entry point installs the global stylesheet. import "./index.css" import { resolveDocLocale } from "./content/registry" import { createDefaultDocsPreferences, initializeDocsPreferences, } from "./lib/preferences" const root = document.getElementById("root")! const prerendered = root.hasChildNodes() const locale = resolveDocLocale(window.location.pathname) document.documentElement.lang = locale initializeDocsPreferences() const app = ( ) if (prerendered) { hydrateRoot(root, app) } else { createRoot(root).render(app) }