@empathyco/x-components
Version:
Empathy X Components
19 lines (16 loc) • 675 B
JavaScript
import { XPlugin } from '../../../../plugins/x-plugin.js';
/**
* Default implementation for the {@link PopularSearchesActions.fetchSuggestions}.
*
* @param _context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions,
* provided by Vuex.
* @param request - The popular searches request to make.
* @returns A Promise of search response that resolves when it fetches the popular searches.
*
* @public
*/
const fetchSuggestions = async (_context, request) => {
return XPlugin.adapter.popularSearches(request).then(({ suggestions }) => suggestions);
};
export { fetchSuggestions };
//# sourceMappingURL=fetch-suggestions.action.js.map