Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {
- LOGIN_USER_SUCCESS
- } from '../actions/types';
- const INITIAL_STATE = {
- error: '',
- message: '',
- content: '',
- authenticated: false,
- authenticating: false,
- username: '',
- fullName: '',
- password: '',
- };
- export default function(state = INITIAL_STATE, action) {
- console.log('anything?');
- switch (action.type) {
- case LOGIN_USER_SUCCESS:
- console.log(';', action.fullName);
- console.log(';;', action);
- console.log(state.fullName)
- return {
- ...state,
- fullName: action.fullName,
- username: action.username,
- password: action.password,
- authenticating: false,
- authenticated: true,
- };
- return state;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement