diff options
author | Starfall <admin@plural.cafe> | 2020-05-31 12:56:29 -0500 |
---|---|---|
committer | Starfall <admin@plural.cafe> | 2020-05-31 12:56:29 -0500 |
commit | 76f79dd29909d39f1d36ef48e6892223d59e29d7 (patch) | |
tree | 8a5ace5fea5cf8a4c6f1c55e01db99a289c4b1e3 /app/javascript/flavours/glitch/reducers/markers.js | |
parent | 0167552bed46508efeed266853a1ee4437e12998 (diff) | |
parent | ddcd9fe9f0e85b1db12ae584749e680146611f9a (diff) |
Merge branch 'glitch'
Diffstat (limited to 'app/javascript/flavours/glitch/reducers/markers.js')
-rw-r--r-- | app/javascript/flavours/glitch/reducers/markers.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/reducers/markers.js b/app/javascript/flavours/glitch/reducers/markers.js new file mode 100644 index 000000000..2e67be82e --- /dev/null +++ b/app/javascript/flavours/glitch/reducers/markers.js @@ -0,0 +1,25 @@ +import { + MARKERS_SUBMIT_SUCCESS, +} from '../actions/notifications'; + +const initialState = ImmutableMap({ + home: '0', + notifications: '0', +}); + +import { Map as ImmutableMap } from 'immutable'; + +export default function markers(state = initialState, action) { + switch(action.type) { + case MARKERS_SUBMIT_SUCCESS: + if (action.home) { + state = state.set('home', action.home); + } + if (action.notifications) { + state = state.set('notifications', action.notifications); + } + return state; + default: + return state; + } +}; |