import {REQUEST_NEXT_ACTIONS, RECIEVE_NEXT_ACTIONS} from '../../constants/dashboardConstants'; export const requestNextActions = () => ({ type: REQUEST_NEXT_ACTIONS, isLoading: true }); export const recieveNextActions = (json) => ({ type: RECIEVE_NEXT_ACTIONS, isLoading: false, nextActions: json }); export const fetchNextActions = () => { return dispatch => { dispatch(requestNextActions()); //TODO : fetch next actions from gravity flow api dispatch(recieveNextActions({})); /* return client.fetch({ url: `${API_SERVER}/dashboards/api/getNextActionsInfo` }) .then(response => dispatch(recieveNextActions(response.data))) .catch(error => { client.onError(error, dispatch); }); */ } }