Update profile.js
This commit is contained in:
@@ -5,24 +5,16 @@ import {
|
||||
UPDATE_PROFILE,
|
||||
GET_PROFILES,
|
||||
GET_REPOS,
|
||||
<<<<<<< HEAD
|
||||
NO_REPOS
|
||||
} from '../actions/types';
|
||||
=======
|
||||
NO_REPOS,
|
||||
} from "../actions/types";
|
||||
>>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb
|
||||
|
||||
const initialState = {
|
||||
profile: null,
|
||||
profiles: [],
|
||||
repos: [],
|
||||
loading: true,
|
||||
<<<<<<< HEAD
|
||||
error: {}
|
||||
=======
|
||||
error: {},
|
||||
>>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb
|
||||
|
||||
};
|
||||
|
||||
function profileReducer(state = initialState, action) {
|
||||
@@ -34,61 +26,38 @@ function profileReducer(state = initialState, action) {
|
||||
return {
|
||||
...state,
|
||||
profile: payload,
|
||||
<<<<<<< HEAD
|
||||
loading: false
|
||||
=======
|
||||
loading: false,
|
||||
>>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb
|
||||
};
|
||||
case GET_PROFILES:
|
||||
return {
|
||||
...state,
|
||||
profiles: payload,
|
||||
<<<<<<< HEAD
|
||||
loading: false
|
||||
=======
|
||||
loading: false,
|
||||
>>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb
|
||||
};
|
||||
case PROFILE_ERROR:
|
||||
return {
|
||||
...state,
|
||||
error: payload,
|
||||
loading: false,
|
||||
<<<<<<< HEAD
|
||||
profile: null
|
||||
=======
|
||||
profile: null,
|
||||
>>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb
|
||||
};
|
||||
case CLEAR_PROFILE:
|
||||
return {
|
||||
...state,
|
||||
profile: null,
|
||||
<<<<<<< HEAD
|
||||
repos: []
|
||||
=======
|
||||
repos: [],
|
||||
>>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb
|
||||
};
|
||||
case GET_REPOS:
|
||||
return {
|
||||
...state,
|
||||
repos: payload,
|
||||
<<<<<<< HEAD
|
||||
loading: false
|
||||
=======
|
||||
loading: false,
|
||||
>>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb
|
||||
};
|
||||
case NO_REPOS:
|
||||
return {
|
||||
...state,
|
||||
<<<<<<< HEAD
|
||||
repos: []
|
||||
=======
|
||||
repos: [],
|
||||
>>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
|
||||
Reference in New Issue
Block a user