chore: fetch to get in redux thunks files name
This commit is contained in:
@@ -4,7 +4,7 @@ import { useSelector } from "react-redux";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { RootState, useAppDispatch } from "../../../redux/store";
|
||||
import KabelModulStatus from "./modulesStatus/KabelModulStatus";
|
||||
import { fetchKueDataThunk } from "../../../redux/thunks/fetchKueDataThunk";
|
||||
import { getKueDataThunk } from "../../../redux/thunks/getKueDataThunk";
|
||||
|
||||
const Baugruppentraeger: React.FC = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
@@ -83,7 +83,7 @@ const Baugruppentraeger: React.FC = () => {
|
||||
}
|
||||
//--------------------------------------------
|
||||
useEffect(() => {
|
||||
dispatch(fetchKueDataThunk());
|
||||
dispatch(getKueDataThunk());
|
||||
}, [dispatch]);
|
||||
//--------------------------------------------
|
||||
return <>{baugruppen}</>;
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
import React, { useEffect } from "react";
|
||||
import { useSelector, useDispatch } from "react-redux";
|
||||
import { RootState, AppDispatch } from "../../../redux/store";
|
||||
import { fetchSystemSettingsThunk } from "../../../redux/thunks/fetchSystemSettingsThunk";
|
||||
import { fetchOpcUaSettingsThunk } from "../../../redux/thunks/fetchOpcUaSettingsThunk";
|
||||
import { getSystemSettingsThunk } from "../../../redux/thunks/getSystemSettingsThunk";
|
||||
import { getOpcUaSettingsThunk } from "../../../redux/thunks/getOpcUaSettingsThunk";
|
||||
|
||||
const NetworkInfo: React.FC = () => {
|
||||
const dispatch: AppDispatch = useDispatch();
|
||||
|
||||
// ✅ OPC UA Daten laden, wenn Komponente angezeigt wird
|
||||
useEffect(() => {
|
||||
dispatch(fetchSystemSettingsThunk());
|
||||
dispatch(fetchOpcUaSettingsThunk());
|
||||
dispatch(getSystemSettingsThunk());
|
||||
dispatch(getOpcUaSettingsThunk());
|
||||
}, [dispatch]);
|
||||
// Werte direkt aus Redux holen
|
||||
const ip =
|
||||
|
||||
Reference in New Issue
Block a user