1
Fork 0
mirror of https://github.com/Steffo99/todocolors.git synced 2024-11-22 16:24:19 +00:00

Fix useHttpBaseURL missing /api

This commit is contained in:
Steffo 2023-08-06 03:36:53 +02:00
parent 79b6d65436
commit 380ff6faf3
Signed by: steffo
GPG key ID: 2A24051445686895

View file

@ -11,7 +11,7 @@ export function useHttpBaseURL(): string | undefined {
useEffect(() => { useEffect(() => {
let url = process.env.NEXT_PUBLIC_TODOBLUE_OVERRIDE_BASE_URL; let url = process.env.NEXT_PUBLIC_TODOBLUE_OVERRIDE_BASE_URL;
if(!url) url = `${window.location.protocol}//${window.location.host}`; if(!url) url = `${window.location.protocol}//${window.location.host}/api`;
console.debug("[useBaseURL] Using base URL:", url); console.debug("[useBaseURL] Using base URL:", url);
setBaseURL(url); setBaseURL(url);
}, []); }, []);