UNPKG

@empathyco/x-components

Version:
23 lines (21 loc) 731 B
// eslint-disable-next-line max-len const fetchAndSaveNextQueryPreview = ({ dispatch, commit }, { query, location }) => { return dispatch('fetchNextQueryPreview', { query, location }) .then(response => { if (response) { commit('setResultsPreview', { [query]: { query, totalResults: response.totalResults, items: response.results } }); } }) .catch(error => { // eslint-disable-next-line no-console console.error(error); }); }; export { fetchAndSaveNextQueryPreview }; //# sourceMappingURL=fetch-and-save-next-query-preview.action.js.map