Merge branch 'master' into likes

This commit is contained in:
asankaran35
2019-12-04 17:41:28 -05:00
committed by GitHub
20 changed files with 1370 additions and 493 deletions

View File

@@ -1,4 +1,17 @@
import {SET_USER, SET_ERRORS, CLEAR_ERRORS, LOADING_UI, SET_AUTHENTICATED, SET_UNAUTHENTICATED, LIKE_POST, UNLIKE_POST, SET_LIKES} from '../types';
import {
SET_USER,
// SET_ERRORS,
// CLEAR_ERRORS,
// LOADING_UI,
SET_AUTHENTICATED,
SET_UNAUTHENTICATED,
LOADING_USER,
LIKE_POST,
UNLIKE_POST,
SET_LIKES
} from '../types';
const initialState = {
authenticated: false,
@@ -21,6 +34,7 @@ export default function(state = initialState, action) {
return {
...state,
authenticated: true,
loading: false,
...action.payload,
};
case LIKE_POST:
@@ -37,6 +51,11 @@ export default function(state = initialState, action) {
return {
...state,
...action.payload
case LOADING_USER:
return {
...state,
loading: true
}
default:
return state;