client/src/reducers/miscReducer.js
author ymh <ymh.work@gmail.com>
Sat, 24 Nov 2018 09:31:16 +0100
changeset 175 6fcda59daff8
parent 129 d48946d164c6
permissions -rw-r--r--
Correct requirements

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;
  }

}