2020-11-19 19:06:09 -09:00
|
|
|
import { SET_NOTIFICATIONS_STATE } from '../actions'
|
|
|
|
|
|
|
|
|
|
const initialState = {
|
|
|
|
|
notifications: false,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const settingsReducer = (previousState = initialState, payload) => {
|
|
|
|
|
const { type, data } = payload
|
|
|
|
|
switch (type) {
|
|
|
|
|
case SET_NOTIFICATIONS_STATE:
|
|
|
|
|
return {
|
|
|
|
|
...previousState,
|
2020-11-19 19:22:18 -09:00
|
|
|
notifications: data,
|
2020-11-19 19:06:09 -09:00
|
|
|
}
|
|
|
|
|
default:
|
|
|
|
|
return previousState
|
|
|
|
|
}
|
|
|
|
|
}
|