diff --git a/squarenotsquare/src/redux/reducers/UserReducer.js b/squarenotsquare/src/redux/reducers/UserReducer.js index e69de29..5b79559 100644 --- a/squarenotsquare/src/redux/reducers/UserReducer.js +++ b/squarenotsquare/src/redux/reducers/UserReducer.js @@ -0,0 +1,19 @@ +import { APP_INIT } from "../types/SystemTypes"; +import { + SQUARE_START, + SQUARE_FINISHED +} from '../types/UserTypes'; + +function usr(state = {}, action) { + switch (action.type) { + case SQUARE_START: + case SQUARE_FINISHED: + return {...state, ...action.user}; + default: + return state; + } +} + +export const userReducer = { + user: usr +}; \ No newline at end of file