WIP:DatePicker in Messkurven
This commit is contained in:
@@ -3,6 +3,7 @@ import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
||||
|
||||
// Typ für den State
|
||||
export interface VariablesState {
|
||||
selectedChartData: any;
|
||||
kueBezeichnungen: string[];
|
||||
isolationsgrenzwerte: number[];
|
||||
verzoegerung: number[];
|
||||
@@ -40,6 +41,7 @@ export interface VariablesState {
|
||||
|
||||
// Initialer Zustand
|
||||
const initialState: VariablesState = {
|
||||
selectedChartData: null,
|
||||
kueBezeichnungen: [],
|
||||
isolationsgrenzwerte: [],
|
||||
verzoegerung: [],
|
||||
@@ -79,6 +81,9 @@ const variablesSlice = createSlice({
|
||||
name: "variables",
|
||||
initialState,
|
||||
reducers: {
|
||||
setSelectedChartData(state, action: PayloadAction<any>) {
|
||||
state.selectedChartData = action.payload;
|
||||
},
|
||||
setVariable(
|
||||
state,
|
||||
action: PayloadAction<{
|
||||
@@ -99,6 +104,7 @@ const variablesSlice = createSlice({
|
||||
},
|
||||
});
|
||||
|
||||
export const { setVariable, setVariables } = variablesSlice.actions;
|
||||
export const { setSelectedChartData, setVariable, setVariables } =
|
||||
variablesSlice.actions;
|
||||
|
||||
export default variablesSlice.reducer;
|
||||
|
||||
Reference in New Issue
Block a user