{"size": 695, "ext": "js", "max_stars_repo_path": "src/reducers/UserReducer.js", "max_stars_repo_name": "hacker-box/hacker-box", "max_stars_repo_stars_event_min_datetime": "2017-06-24T05:56:05.000Z", "max_stars_repo_stars_event_max_datetime": "2017-06-27T03:38:05.000Z", "max_issues_repo_path": "src/reducers/UserReducer.js", "max_issues_repo_name": "hacker-box/hacker-box", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/reducers/UserReducer.js", "max_forks_repo_name": "hacker-box/hacker-box", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.4193548387, "max_line_length": 65, "alphanum_fraction": 0.5366906475}
const { handleActions } = require("redux-actions");

const defaultState = {};

module.exports = handleActions(
  {
    SET_USER: (state, action) => ({
      ...state,
      user: action.payload
    }),
    SET_CLI_CONNECT: (state, action) => ({
      ...state,
      cli: action.payload
    }),
    SET_CLI_DISCONNECT: (state, action) => ({
      ...state,
      cli: null
    }),
    GET_PASSWORD_PIN: (state, { payload: res }) => ({
      ...state,
      passcode: res.body.passcode
    }),
    RESET_PIN: (state, action) => ({ ...state, passcode: null }),
    SET_CLI_DATA: (state, action) => ({
      ...state,
      cli: { ...state.cli, hbox: action.payload }
    })
  },
  defaultState
);
