diff --git a/twistter-frontend/src/redux/actions/userActions.js b/twistter-frontend/src/redux/actions/userActions.js index 41bd4bb..5067258 100644 --- a/twistter-frontend/src/redux/actions/userActions.js +++ b/twistter-frontend/src/redux/actions/userActions.js @@ -9,7 +9,8 @@ export const getUserData = () => (dispatch) => { dispatch({ type: SET_USER, payload: res.data, - }) + }); + dispatch({type: CLEAR_ERRORS}); }) .catch((err) => console.error(err)); } @@ -99,7 +100,7 @@ export const uploadImage = (formData) => (dispatch) => { axios.post('/user/image', formData) .then(() => { dispatch(getUserData()); - dispatch({ type: CLEAR_ERRORS }); + // dispatch({ type: CLEAR_ERRORS }); }) .catch(err => { console.log(err); diff --git a/twistter-frontend/src/redux/reducers/uiReducer.js b/twistter-frontend/src/redux/reducers/uiReducer.js index 65e781d..491206e 100644 --- a/twistter-frontend/src/redux/reducers/uiReducer.js +++ b/twistter-frontend/src/redux/reducers/uiReducer.js @@ -23,7 +23,7 @@ export default function(state = initialState, action) { return { ...state, loading: true - } + }; default: return state; }