UNPKG

@shopgate/pwa-common

Version:

Common library for the Shopgate Connect PWA.

5 lines 682 B
function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}import{ACTION_PUSH}from'@virtuous/conductor';import{navigate}from"../../action-creators/router";import{mutable}from"../../helpers/redux";/** * @mixes {MutableFunction} * @param {Object} params The history params. * @return {Function} The dispatched action. */export var historyPush=mutable(function(params){return function(dispatch){dispatch(navigate(_extends({},params,{action:ACTION_PUSH})));};});