refactor: API-Port-Variable entfernt, dynamische Port-Nutzung eingeführt
- NEXT_PUBLIC_API_PORT_3000 entfernt - API-Aufrufe basieren jetzt auf window.location.hostname:3000 - kein Rebuild mehr bei IP-Änderung nötig - .env.local aufgeräumt - CHANGELOG.md auf 1.1.68 aktualisiert
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// /components/mainComponent/hooks/useFetchWebServiceMap.js
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
const API_BASE_URL = process.env.NEXT_PUBLIC_API_PORT_3000; // API-URL aus .env.local
|
||||
const API_BASE_URL = typeof window !== "undefined" ? `${window.location.protocol}//${window.location.hostname}:3000` : "";
|
||||
|
||||
const useFetchPoiData = (setPoiTypMap, setPoiData) => {
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user