feat: ISO, RSL und TDR separate Charts ohne den Switcher
This commit is contained in:
23
redux/slices/isoChartTypeSlice.ts
Normal file
23
redux/slices/isoChartTypeSlice.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
// redux/slices/isoChartTypeSlice.ts
|
||||
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
||||
|
||||
interface isoChartTypeState {
|
||||
chartTitle: string;
|
||||
}
|
||||
|
||||
const initialState: isoChartTypeState = {
|
||||
chartTitle: "Isolationsmessung", // Standardwert
|
||||
};
|
||||
|
||||
const isoChartTypeSlice = createSlice({
|
||||
name: "isoChartType",
|
||||
initialState,
|
||||
reducers: {
|
||||
setChartTitle: (state, action: PayloadAction<string>) => {
|
||||
state.chartTitle = action.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { setChartTitle } = isoChartTypeSlice.actions;
|
||||
export default isoChartTypeSlice.reducer;
|
||||
Reference in New Issue
Block a user