client/src/reducers/miscReducer.js
author ymh <ymh.work@gmail.com>
Mon, 08 Oct 2018 18:35:47 +0200
changeset 168 ea92f4fe783d
parent 129 d48946d164c6
permissions -rw-r--r--
- move SlateEditor and dependencies to its own folder - remove Immutable - remove redux-persist-immutable - remobe redux-immutable - update libraries - added tests on store manipulations (accessor and reducers)

import * as types from '../constants/actionTypes';

export const autoSubmit = (state = false, action) => {
  switch (action.type) {
    case types.USER_TOGGLE_AUTO_SUBMIT:
      return action.value;
    default:
      return state;
  }
}

export const online = (state = false, action) => {
  switch (action.type) {
    case types.STATUS_ONLINE:
      return true;
    case types.STATUS_OFFLINE:
      return false;
    default:
      return state;
  }

}