import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; import { BrowserRouter, HashRouter } from "react-router-dom"; import App from "./App"; import { ThemeProvider } from "./theme/ThemeProvider"; import "./index.css"; /** * Clean URLs on the real site; hash URLs when the build is going somewhere * that is not a web root. * * lightworks.media serves this from / with an Apache rewrite behind it, so * BrowserRouter is correct there and /services is a real, shareable address. * The single-file preview build is served from a path of its host's choosing, * where no route would ever match the pathname and every page would render as * not-found. That build sets VITE_ROUTER=hash and routes after the # instead. */ const Router = import.meta.env.VITE_ROUTER === "hash" ? HashRouter : BrowserRouter; createRoot(document.getElementById("root")!).render( , );