You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
541 B

  1. import {
  2. MARKERS_SUBMIT_SUCCESS,
  3. } from '../actions/markers';
  4. const initialState = ImmutableMap({
  5. home: '0',
  6. notifications: '0',
  7. });
  8. import { Map as ImmutableMap } from 'immutable';
  9. export default function markers(state = initialState, action) {
  10. switch(action.type) {
  11. case MARKERS_SUBMIT_SUCCESS:
  12. if (action.home) {
  13. state = state.set('home', action.home);
  14. }
  15. if (action.notifications) {
  16. state = state.set('notifications', action.notifications);
  17. }
  18. return state;
  19. default:
  20. return state;
  21. }
  22. };