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:
ISA
2025-05-16 07:37:25 +02:00
parent 06028ccb6f
commit 69830a1185
7 changed files with 141 additions and 4 deletions

View File

@@ -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(() => {