mirror of
https://github.com/KevinMidboe/planetposen-frontend.git
synced 2025-12-29 13:01:01 +00:00
apiUrl builds url to planetposen-backend which prefixes localhost if dev
This commit is contained in:
@@ -5,8 +5,9 @@ const LOCALHOST_API = 'http://localhost:30010';
|
|||||||
export function buildApiUrl(path: string) {
|
export function buildApiUrl(path: string) {
|
||||||
let localhostApi = false;
|
let localhostApi = false;
|
||||||
|
|
||||||
if (dev) localhostApi = true;
|
if (dev) {
|
||||||
if (browser && window?.location?.href.includes('localhost')) {
|
localhostApi = true;
|
||||||
|
} else if (browser && window?.location?.href.includes('localhost')) {
|
||||||
localhostApi = true;
|
localhostApi = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user