client/src/reducers/authReducer.js
changeset 47 64428c7ebc19
parent 44 3b20e2b584fe
child 52 96f8a4a59bd9
equal deleted inserted replaced
46:4aa24724e5b3 47:64428c7ebc19
    16   }
    16   }
    17 }
    17 }
    18 
    18 
    19 export const token = (state = null, action) => {
    19 export const token = (state = null, action) => {
    20   switch (action.type) {
    20   switch (action.type) {
    21     case types.AUTH_LOGIN_SUCCESS:
    21     case types.AUTH_STORE_TOKEN:
    22       console.log('token', action.token)
       
    23       return action.token;
    22       return action.token;
    24     default:
    23     default:
    25       return state;
    24       return state;
    26   }
    25   }
    27 }
    26 }