mirror of
https://github.com/sergi0g/cup.git
synced 2025-11-17 01:23:39 -05:00
Change API versioning to match Cup version
This commit is contained in:
@@ -6,8 +6,8 @@ import { theme } from "../theme";
|
||||
export default function Loading({ onLoad }: { onLoad: (data: Data) => void }) {
|
||||
fetch(
|
||||
process.env.NODE_ENV === "production"
|
||||
? "/api/v1/full"
|
||||
: `http://${window.location.hostname}:8000/api/v1/full`,
|
||||
? "/api/v3/json"
|
||||
: `http://${window.location.hostname}:8000/api/v3/json`,
|
||||
).then((response) =>
|
||||
response.json().then((data) => {
|
||||
onLoad(data as Data);
|
||||
|
||||
Reference in New Issue
Block a user