diff --git a/web/index.html b/web/index.html index 8f381ea..318ce11 100644 --- a/web/index.html +++ b/web/index.html @@ -26,9 +26,9 @@ content="#030712" > {% endif %} - - - + + + Cup diff --git a/web/src/components/Loading.tsx b/web/src/components/Loading.tsx index 957fb51..400f2ee 100644 --- a/web/src/components/Loading.tsx +++ b/web/src/components/Loading.tsx @@ -6,7 +6,7 @@ import { LoaderCircle } from "lucide-react"; export default function Loading({ onLoad }: { onLoad: (data: Data) => void }) { fetch( process.env.NODE_ENV === "production" - ? "/api/v3/json" + ? "./api/v3/json" : `http://${window.location.hostname}:8000/api/v3/json`, ).then((response) => response.json().then((data) => { @@ -26,9 +26,9 @@ export default function Loading({ onLoad }: { onLoad: (data: Data) => void }) {
-
+
Loading

diff --git a/web/vite.config.ts b/web/vite.config.ts index 4fdbb75..9821bf7 100644 --- a/web/vite.config.ts +++ b/web/vite.config.ts @@ -4,6 +4,7 @@ import react from "@vitejs/plugin-react-swc"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], + base: "./", build: { rollupOptions: { // https://stackoverflow.com/q/69614671/vite-without-hash-in-filename#75344943