fix: lade KUE-Daten in kabelueberwachung Seite über fetchKueDataThunk bei leerem Redux-Store
- Problem behoben, dass Module in Produktionsumgebung beim Direktaufruf nicht angezeigt wurden - fetchKueDataThunk wird nun bei fehlenden kueIso-Daten in kabelueberwachung.tsx aufgerufen - CGI-Pfad (/CPL?/...) bleibt erhalten für Backend-Platzhalterauflösung via kueData.js
This commit is contained in:
@@ -5,6 +5,7 @@ import Kue705FO from "../components/main/kabelueberwachung/kue705FO/Kue705FO";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { AppDispatch } from "../redux/store"; // Adjust the path to your Redux store file
|
||||
import { RootState } from "../redux/store"; // Adjust the path to your Redux store file
|
||||
import { fetchKueDataThunk } from "../redux/thunks/fetchKueDataThunk";
|
||||
|
||||
function Kabelueberwachung() {
|
||||
const dispatch: AppDispatch = useDispatch();
|
||||
@@ -116,6 +117,12 @@ function Kabelueberwachung() {
|
||||
const dia0Iso = loopData["DIA0"]?.[3];
|
||||
|
||||
//------------------------------------------------------------
|
||||
useEffect(() => {
|
||||
if (kueIso.length === 0) {
|
||||
console.log("📦 Lade KUE-Daten aus fetchKueDataThunk...");
|
||||
dispatch(fetchKueDataThunk());
|
||||
}
|
||||
}, []);
|
||||
|
||||
//----------------------------------------------------------------
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user