Skip to content

Commit

Permalink
chore: use ConfigTypes instead of hardcoded types
Browse files Browse the repository at this point in the history
  • Loading branch information
dubisdev committed Jan 6, 2024
1 parent d63bb69 commit 0b7646f
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions app/renderer/src/store/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,28 @@ const configSlice = createSlice({
name: "config",
initialState,
reducers: {
setStayFocus(state, action: PayloadAction<number>) {
setStayFocus(
state,
action: PayloadAction<ConfigTypes["stayFocus"]>
) {
state.stayFocus = action.payload;
},
setShorBreak(state, action: PayloadAction<number>) {
setShorBreak(
state,
action: PayloadAction<ConfigTypes["shortBreak"]>
) {
state.shortBreak = action.payload;
},
setLongBreak(state, action: PayloadAction<number>) {
setLongBreak(
state,
action: PayloadAction<ConfigTypes["longBreak"]>
) {
state.longBreak = action.payload;
},
setSessionRounds(state, action: PayloadAction<number>) {
setSessionRounds(
state,
action: PayloadAction<ConfigTypes["sessionRounds"]>
) {
state.sessionRounds = action.payload;
},
restoreDefaultConfig() {
Expand Down

0 comments on commit 0b7646f

Please sign in to comment.