exocore-docs / src /main.tsx
ChoruYt's picture
Upload 151 files
dc2b30a verified
Raw
History Blame Contribute Delete
583 Bytes
import React from "react";
import ReactDOM from "react-dom/client";
import { HashRouter } from "react-router-dom";
import App from "./App";
import "./styles.css";
// HashRouter (not BrowserRouter) so the docs site works on every dumb static
// host — Hugging Face Spaces, GitHub Pages, IPFS, S3 — without needing a
// rewrite rule for client-side routes. URL fragment handling stays inside
// the SPA.
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<HashRouter>
<App />
</HashRouter>
</React.StrictMode>,
);