Profile image upload frontend and backend finished

This commit is contained in:
2019-10-27 18:06:47 -04:00
parent 60f83da514
commit 44d3450b10
7 changed files with 210 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
import {SET_USER, SET_ERRORS, CLEAR_ERRORS, LOADING_UI, SET_AUTHENTICATED, SET_UNAUTHENTICATED} from '../types';
import {SET_USER, SET_ERRORS, CLEAR_ERRORS, LOADING_UI, SET_AUTHENTICATED, SET_UNAUTHENTICATED, LOADING_USER} from '../types';
const initialState = {
authenticated: false,
@@ -20,8 +20,14 @@ export default function(state = initialState, action) {
case SET_USER:
return {
authenticated: true,
loading: false,
...action.payload,
};
case LOADING_USER:
return {
...state,
loading: true
}
default:
return state;
}