diff --git a/frontend/src/actions/dashboard/nextActionsActions.js b/frontend/src/actions/dashboard/nextActionsActions.js index ad9960f..cfaff25 100644 --- a/frontend/src/actions/dashboard/nextActionsActions.js +++ b/frontend/src/actions/dashboard/nextActionsActions.js @@ -1,4 +1,8 @@ import {REQUEST_NEXT_ACTIONS, RECIEVE_NEXT_ACTIONS} from '../../constants/dashboardConstants'; +import { API_SERVER } from '../../config'; +import HtmlClient from '../../helpers/HtmlClient'; + +const client = new HtmlClient(); export const requestNextActions = () => ({ type: REQUEST_NEXT_ACTIONS, @@ -14,16 +18,12 @@ export const recieveNextActions = (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` + url: `${API_SERVER}/wp-json/wiaas/next-delivery-steps` }) .then(response => dispatch(recieveNextActions(response.data))) .catch(error => { client.onError(error, dispatch); - }); - */ + }); } }