Created
April 19, 2018 10:44
-
-
Save Tinusw/a025f907c720a4b0e97358516ccc11bd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { AUTH_USER, AUTH_ERROR } from "../actions/types"; | |
| export default function(state = {}, action) { | |
| switch (action.type) { | |
| case AUTH_USER: | |
| return { ...state, error: "", authenticated: true }; | |
| case AUTH_ERROR: | |
| return { ...state, error: action.payload.response }; | |
| } | |
| return state; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment