chore: rename service/thunk files to follow get/fetch naming convention
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// /redux/slices/analogInputsHistorySlice.ts
|
||||
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
||||
import { fetchAnalogInputsHistoryThunk } from "../thunks/fetchAnalogInputsHistoryThunk";
|
||||
import { getAnalogInputsHistoryThunk } from "../thunks/getAnalogInputsHistoryThunk";
|
||||
|
||||
type InputHistoryState = {
|
||||
data: Record<number, any[]>;
|
||||
@@ -20,18 +20,18 @@ const analogInputsHistorySlice = createSlice({
|
||||
reducers: {},
|
||||
extraReducers: (builder) => {
|
||||
builder
|
||||
.addCase(fetchAnalogInputsHistoryThunk.pending, (state) => {
|
||||
.addCase(getAnalogInputsHistoryThunk.pending, (state) => {
|
||||
state.isLoading = true;
|
||||
state.error = null;
|
||||
})
|
||||
.addCase(
|
||||
fetchAnalogInputsHistoryThunk.fulfilled,
|
||||
getAnalogInputsHistoryThunk.fulfilled,
|
||||
(state, action: PayloadAction<Record<number, any[]>>) => {
|
||||
state.data = action.payload;
|
||||
state.isLoading = false;
|
||||
}
|
||||
)
|
||||
.addCase(fetchAnalogInputsHistoryThunk.rejected, (state, action) => {
|
||||
.addCase(getAnalogInputsHistoryThunk.rejected, (state, action) => {
|
||||
state.isLoading = false;
|
||||
state.error = action.payload as string;
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/slices/tdmChartSlice.ts
|
||||
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
||||
import { fetchAllTDMData } from "../thunks/fetchAllTDMThunk";
|
||||
import { fetchAllTDMData } from "../thunks/getAllTDMThunk";
|
||||
import type { TDMEntry } from "../types/tdmEntryTypes";
|
||||
|
||||
interface TDMChartState {
|
||||
|
||||
Reference in New Issue
Block a user