From 7834bbca391a27cf9741ca3a534d074643490d5a Mon Sep 17 00:00:00 2001 From: ISA Date: Fri, 2 May 2025 08:21:15 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20build=20fix=20webversion=201.6.337=20TDR?= =?UTF-8?q?-Einstellung=20Modal=20und=20Digitale=20Ausg=C3=A4nge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kue705FO/modals/TdrEinstellung.tsx | 11 +++++++++-- config/webVersion.ts | 2 +- pages/digitalInputs.tsx | 14 -------------- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/components/main/kabelueberwachung/kue705FO/modals/TdrEinstellung.tsx b/components/main/kabelueberwachung/kue705FO/modals/TdrEinstellung.tsx index 072292e..a867f4b 100644 --- a/components/main/kabelueberwachung/kue705FO/modals/TdrEinstellung.tsx +++ b/components/main/kabelueberwachung/kue705FO/modals/TdrEinstellung.tsx @@ -1,4 +1,9 @@ "use client"; +declare global { + interface Window { + __tdrCache?: Record; + } +} import React, { useState, useEffect } from "react"; import { useSelector } from "react-redux"; @@ -17,7 +22,9 @@ export default function TdrEinstellung({ slot, onClose }: Props) { window.__tdrCache = window.__tdrCache || {}; } const cachedTdr = - typeof window !== "undefined" ? window.__tdrCache[cacheKey] : null; + typeof window !== "undefined" + ? window.__tdrCache?.[cacheKey] ?? null + : null; const [tdrData, setTdrData] = useState( () => @@ -36,7 +43,7 @@ export default function TdrEinstellung({ slot, onClose }: Props) { const updateCache = (data: typeof tdrData, active = tdrActive) => { if (typeof window !== "undefined") { - window.__tdrCache[cacheKey] = { + (window.__tdrCache ??= {})[cacheKey] = { data, tdrActive: active, }; diff --git a/config/webVersion.ts b/config/webVersion.ts index 7544093..e63abd3 100644 --- a/config/webVersion.ts +++ b/config/webVersion.ts @@ -6,5 +6,5 @@ 2: Patch oder Hotfix (Bugfixes oder kleine Änderungen). */ -const webVersion = "1.6.336"; +const webVersion = "1.6.337"; export default webVersion; diff --git a/pages/digitalInputs.tsx b/pages/digitalInputs.tsx index 373bb71..61c6457 100644 --- a/pages/digitalInputs.tsx +++ b/pages/digitalInputs.tsx @@ -5,12 +5,10 @@ import { useDispatch, useSelector } from "react-redux"; import { AppDispatch, RootState } from "../redux/store"; import InputModal from "../components/main/einausgaenge/modals/InputModal"; -import OutputModal from "../components/main/einausgaenge/modals/OutputModal"; import { fetchDigitaleEingaengeThunk } from "../redux/thunks/fetchDigitaleEingaengeThunk"; import { fetchDigitalOutputsThunk } from "../redux/thunks/fetchDigitalOutputsThunk"; -import DigitalOutputs from "../components/main/einausgaenge/DigitalOutputs"; import DigitalInputs from "../components/main/einausgaenge/DigitalInputs"; const EinAusgaenge: React.FC = () => { @@ -72,10 +70,6 @@ const EinAusgaenge: React.FC = () => { openInputModal={openInputModal} inputRange={{ start: 16, end: 32 }} /> - {/* Digitale Ausgänge nicht Erforderlich*/} - {/* - - */} {isInputModalOpen && selectedInput && ( @@ -85,14 +79,6 @@ const EinAusgaenge: React.FC = () => { isOpen={isInputModalOpen} /> )} - - {isOutputModalOpen && selectedOutput && ( - - )} ); };