diff --git a/components/modules/Kue705FO.jsx b/components/modules/Kue705FO.jsx index 8309b57..e91a051 100644 --- a/components/modules/Kue705FO.jsx +++ b/components/modules/Kue705FO.jsx @@ -22,6 +22,8 @@ function Kue705FO({ const [loopTitleText, setloopTitleText] = useState( "Schleifenwiderstand [kOhm]" ); + const [loopDisplayValue, setLoopDisplayValue] = useState(schleifenwiderstand); // Initialisiere den loopDisplayValue mit schleifenwiderstand + const [isoDisplayText, setIsoDisplayText] = useState("Aderbruch"); const [groundFaultDisplayText, setGroundFaultDisplayText] = useState("Erdschluss"); @@ -66,13 +68,12 @@ function Kue705FO({ if (button === "Schleife") { setActiveButton("Schleife"); setloopTitleText("Schleifenwiderstand [kOhm]"); - setCurrentDisplayValue(schleifenwiderstand || "0"); } else if (button === "TDR") { setActiveButton("TDR"); setloopTitleText("Entfernung [Km]"); - setCurrentDisplayValue(tdrLocation || "0"); } }; + // Funktion für die Schleifenmessung const goLoop = () => { let slot = slotIndex; @@ -106,17 +107,6 @@ 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; @@ -340,7 +330,7 @@ function Kue705FO({ Alarm - + {/* Anzeige des Isolation */}
-

{schleifenwiderstand + " KOhm"}

+

+ {loopDisplayValue + + (activeButton === "Schleife" ? " KOhm" : " Km")} +