IP kommt von window und nicht von.env.local, weil in CHIPTOOL kann die IP eingestellt werden

This commit is contained in:
ISA
2024-10-21 12:25:16 +02:00
parent 328b1d8a0e
commit 6f26e1b503
5 changed files with 111 additions and 72 deletions

View File

@@ -1,3 +1,4 @@
"use client";
import React, { useState, useEffect } from "react";
import ReactModal from "react-modal";
import Chart from "chart.js/auto";
@@ -107,6 +108,18 @@ function Kue705FO({
// Funktion für die TDR-Messung
const goTDR = () => {
//-------------------------------------------------
const [isClient, setIsClient] = useState(false);
useEffect(() => {
// This will only run in the client/browser, not on the server
setIsClient(true);
}, []);
if (!isClient) {
return null; // or a loading spinner
}
//-------------------------------------------------
let slot = slotIndex;
if (slot >= 32) {