From 0b7646f185eb03ebb868b4e8451808902d782e3b Mon Sep 17 00:00:00 2001 From: dubisdev Date: Sat, 6 Jan 2024 19:53:34 +0100 Subject: [PATCH] chore: use ConfigTypes instead of hardcoded types --- app/renderer/src/store/config/index.ts | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/app/renderer/src/store/config/index.ts b/app/renderer/src/store/config/index.ts index cc4e5ba4..50451792 100644 --- a/app/renderer/src/store/config/index.ts +++ b/app/renderer/src/store/config/index.ts @@ -13,16 +13,28 @@ const configSlice = createSlice({ name: "config", initialState, reducers: { - setStayFocus(state, action: PayloadAction) { + setStayFocus( + state, + action: PayloadAction + ) { state.stayFocus = action.payload; }, - setShorBreak(state, action: PayloadAction) { + setShorBreak( + state, + action: PayloadAction + ) { state.shortBreak = action.payload; }, - setLongBreak(state, action: PayloadAction) { + setLongBreak( + state, + action: PayloadAction + ) { state.longBreak = action.payload; }, - setSessionRounds(state, action: PayloadAction) { + setSessionRounds( + state, + action: PayloadAction + ) { state.sessionRounds = action.payload; }, restoreDefaultConfig() {