Don't call changeTimeslot() from reducer.

This commit is contained in:
Matthew Stratford 2020-04-12 15:29:05 +01:00
parent 4afcc9fc4e
commit d2212ceae9

View file

@ -49,8 +49,6 @@ const broadcastState = createSlice({
reducers: { reducers: {
changeSetting<K extends keyof BroadcastState>(state: BroadcastState, action: PayloadAction<{ key: K, val: BroadcastState[K] }>) { changeSetting<K extends keyof BroadcastState>(state: BroadcastState, action: PayloadAction<{ key: K, val: BroadcastState[K] }>) {
state[action.payload.key] = action.payload.val; state[action.payload.key] = action.payload.val;
console.log("Changing timeslot broadcast options.")
changeTimeslot()
}, },
toggleTracklisting(state) { toggleTracklisting(state) {
state.tracklisting = !state.tracklisting; state.tracklisting = !state.tracklisting;