quintodrome/ui/src/reducers/settingsReducer.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
388 B
JavaScript
Raw Normal View History

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,
notifications: data
}
default:
return previousState
}
}