@shopgate/engage
Version:
Shopgate's ENGAGE library.
4 lines • 759 B
JavaScript
import{connect}from'react-redux';import{historyPush}from'@shopgate/pwa-common/actions/router/historyPush';import{historyPop}from'@shopgate/pwa-common/actions/router/historyPop';import{historyReplace}from'@shopgate/pwa-common/actions/router/historyReplace';import{historyReset}from'@shopgate/pwa-common/actions/router/historyReset';/**
* @param {Function} dispatch Dispatches redux actions.
* @returns {Object}
*/function mapDispatchToProps(dispatch){return{push:function push(params){return dispatch(historyPush(params));},pop:function pop(){return dispatch(historyPop());},replace:function replace(params){return dispatch(historyReplace(params));},reset:function reset(){return dispatch(historyReset());}};}export default connect(null,mapDispatchToProps);