client/src/reducers/miscReducer.js
author Alexandre Segura <mex.zktk@gmail.com>
Thu, 22 Jun 2017 10:47:10 +0200
changeset 72 7634b424f426
child 107 e6f85e26b08c
permissions -rw-r--r--
Add checkbox to add not on enter key.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
72
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     1
import * as types from '../constants/actionTypes';
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     2
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     3
export const autoSubmit = (state = false, action) => {
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     4
  switch (action.type) {
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     5
    case types.USER_TOGGLE_AUTO_SUBMIT:
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     6
      return action.value;
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     7
    default:
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     8
      return state;
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
     9
  }
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    10
}
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    11
7634b424f426 Add checkbox to add not on enter key.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff changeset
    12