import types from '../constants/ActionTypes'
import utils from '../../shared/utils'

function replaceUserInfo(userInfo) {
    return {
        type: types.REPLACE_USER_INFO,
        userInfo
    }
}

function clearUserInfo() {
    return {type: types.CLEAR_USER_INFO}
}

function fetchUserInfo() {
    return dispatch => {
        utils.ajax({url: '/api/user/getUserInfo'}).then(res => {
            dispatch(replaceUserInfo(res))
        })
    }
}

export default {
    replaceUserInfo,
    fetchUserInfo,
    clearUserInfo
}

@@ -197,79 +197,8 @@
 %0A%7D%0A%0A
-function clearUserInfo() %7B%0A    return %7Btype: types.CLEAR_USER_INFO%7D%0A%7D%0A%0A
 func

Update index.js