refactor: lade OPC UA Daten direkt in NetworkInfo-Komponente statt global in _app.tsx
- Thunk `fetchOpcUaSettingsThunk` wird jetzt nur bei Anzeige von NetworkInfo ausgeführt - Reduzierte Netzwerklast und bessere Trennung von Zuständigkeiten - Entfernt globalen OPC UA-Aufruf aus _app.tsx
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
||||
|
||||
interface TestState {
|
||||
testData: any[];
|
||||
}
|
||||
|
||||
const initialState: TestState = {
|
||||
testData: [],
|
||||
};
|
||||
|
||||
const testSlice = createSlice({
|
||||
name: "test",
|
||||
initialState,
|
||||
reducers: {
|
||||
setTestData: (state, action: PayloadAction<any[]>) => {
|
||||
state.testData = action.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { setTestData } = testSlice.actions;
|
||||
export default testSlice.reducer;
|
||||
Reference in New Issue
Block a user