Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ...
- // remove auth data from state
- case 'LOGOUT':
- return { ...state, redirectTo: '/', token: null, currentUser: null };
- // redirect to home and put user into state
- case 'SETTINGS_SAVED':
- return {
- ...state,
- redirectTo: action.error ? null : '/',
- currentUser: action.error ? null : action.payload.user
- };
- // ...
Advertisement
Add Comment
Please, Sign In to add comment