import { Data } from "../types"; import Logo from "./Logo"; import { theme } from "../theme"; import { LoaderCircle } from "lucide-react"; export default function Loading({ onLoad }: { onLoad: (data: Data) => void }) { fetch( process.env.NODE_ENV === "production" ? "/api/v3/json" : `http://${window.location.hostname}:8000/api/v3/json`, ).then((response) => response.json().then((data) => { onLoad(data as Data); }), ); return (

Cup

Loading

If this takes more than a few seconds, there was probably a problem fetching the data. Please try reloading the page and report a bug if the problem persists.

); }