Advertisement
Guest User

Untitled

a guest
Jun 12th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. import {
  2. LOGIN_USER_SUCCESS
  3. } from '../actions/types';
  4.  
  5. const INITIAL_STATE = {
  6. error: '',
  7. message: '',
  8. content: '',
  9. authenticated: false,
  10. authenticating: false,
  11. username: '',
  12. fullName: '',
  13. password: '',
  14. };
  15.  
  16. export default function(state = INITIAL_STATE, action) {
  17. console.log('anything?');
  18. switch (action.type) {
  19. case LOGIN_USER_SUCCESS:
  20. console.log(';', action.fullName);
  21. console.log(';;', action);
  22. console.log(state.fullName)
  23. return {
  24. ...state,
  25. fullName: action.fullName,
  26. username: action.username,
  27. password: action.password,
  28. authenticating: false,
  29. authenticated: true,
  30. };
  31. return state;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement