{"size": 398, "ext": "js", "max_stars_repo_path": "src/redux/reducers/auth.js", "max_stars_repo_name": "avilaroman/turing-node-example-spanish", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/redux/reducers/auth.js", "max_issues_repo_name": "avilaroman/turing-node-example-spanish", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/redux/reducers/auth.js", "max_forks_repo_name": "avilaroman/turing-node-example-spanish", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.5333333333, "max_line_length": 66, "alphanum_fraction": 0.6708542714}
import initialState from "../initialState";
import update from "immutability-helper";
import { IS_AUTHENTICATED } from '../actionTypes';

export default function auth (state = initialState.auth, action) {
  switch(action.type) {
    case IS_AUTHENTICATED: {
      return update(state, {
        isAuthenticated: { $set: action.isAuthenticated }
      });
    }
    default:
      return state
  }
}