UNPKG

@empathyco/x-components

Version:
18 lines (16 loc) 585 B
/** * Default implementation for the {@link SearchActions.setUrlParams}. * * @param context - The {@link https://vuex.vuejs.org/guide/actions.html | context} of the actions, * provided by Vuex. * @param urlParams - List of params from the url. * @public */ const setUrlParams = ({ commit, state }, { query, page, sort }) => { const currentQuery = state.query; commit('setQuery', query); commit('setPage', !currentQuery || currentQuery === query ? page : 1); commit('setSort', sort); }; export { setUrlParams }; //# sourceMappingURL=set-url-params.action.js.map