Letzte TDR-Messung anzeigen für ausgewählte Slot
This commit is contained in:
14
redux/thunks/fetchTDMListBySlotThunk.ts
Normal file
14
redux/thunks/fetchTDMListBySlotThunk.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
// /redux/thunks/fetchTDMDataBySlotThunk.ts
|
||||
|
||||
import { createAsyncThunk } from "@reduxjs/toolkit";
|
||||
import { fetchTDMDataBySlot } from "../../services/fetchTDMListBySlot";
|
||||
|
||||
export const fetchTDMDataBySlotThunk = createAsyncThunk(
|
||||
"tdmSingleChart/fetchSlotData",
|
||||
async (slot: number) => {
|
||||
const data = await fetchTDMDataBySlot(slot);
|
||||
if (!data) throw new Error("Keine TDM-Daten für diesen Slot gefunden");
|
||||
|
||||
return { slot, data }; // ✅ das erwartet der Slice!
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user