fix: WebSocket funktioniert

This commit is contained in:
ISA
2025-06-12 07:16:38 +02:00
parent 0a97c359d8
commit 71df8df72d
10 changed files with 10 additions and 1923 deletions

View File

@@ -806,14 +806,13 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
const params = new URLSearchParams(window.location.search);
const m = params.get("m");
const u = params.get("u");
const mode = process.env.NEXT_PUBLIC_USE_MOCKS === "true" ? "mock" : "live";
const socket = io({
query: { m, u, mode },
const socket = io(process.env.NEXT_PUBLIC_SOCKET_URL, {
query: { m, u },
});
socket.on("connect", () => {
console.log("🔗 WebSocket verbunden (Modus:", mode, ")");
console.log("🔗 WebSocket verbunden ");
});
socket.on("GisLinesStatusUpdated", data => {