UNPKG

@empathyco/x-components

Version:
21 lines (19 loc) 638 B
const fetchAndSaveNextQueryPreview = async ({ 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 => { console.error(error); }); }; export { fetchAndSaveNextQueryPreview }; //# sourceMappingURL=fetch-and-save-next-query-preview.action.js.map