refactor: Lade alle window-basierten .js-Dateien dynamisch und umgebungsabhängig
- Alle Services (ae.js, de.js, da.js, kueData.js, Start.js, System.js, opcua.js) laden ihre Scripte abhängig von der Umgebung - Vermeidet unnötige globale Script-Ladung über loadWindowVariables.ts - Reduziert Netzwerklast und verbessert Modularität und Performance
This commit is contained in:
15
redux/thunks/fetchKueDataThunk.ts
Normal file
15
redux/thunks/fetchKueDataThunk.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
// ✅ Thunk: /redux/thunks/fetchKueDataThunk.ts
|
||||
|
||||
import { createAsyncThunk } from "@reduxjs/toolkit";
|
||||
import { fetchKueData } from "../../services/fetchKueData";
|
||||
import { setKueData } from "../slices/kueDataSlice";
|
||||
|
||||
export const fetchKueDataThunk = createAsyncThunk(
|
||||
"kueData/fetch",
|
||||
async (_, { dispatch }) => {
|
||||
const data = await fetchKueData();
|
||||
if (data) {
|
||||
dispatch(setKueData(data));
|
||||
}
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user