Files
CPLv4.0/redux/slices/loopChartTypeSlice.ts

24 lines
577 B
TypeScript

// redux/slices/loopChartTypeSlice.ts
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
interface LoopChartTypeState {
chartTitle: string;
}
const initialState: LoopChartTypeState = {
chartTitle: "Isolationsmessung", // Standardwert
};
const loopChartTypeSlice = createSlice({
name: "loopChartType",
initialState,
reducers: {
setChartTitle: (state, action: PayloadAction<string>) => {
state.chartTitle = action.payload;
},
},
});
export const { setChartTitle } = loopChartTypeSlice.actions;
export default loopChartTypeSlice.reducer;