@shopgate/pwa-common
Version:
Common library for the Shopgate Connect PWA.
5 lines • 431 B
JavaScript
import{HISTORY_RESET_TO}from"../../constants/ActionTypes";import{navigate}from"../../action-creators/router";import{mutable}from"../../helpers/redux";/**
* @mixes {MutableFunction}
* @param {Object} pathname The pathname to reset to
* @return {Function} The dispatched action.
*/export var historyResetTo=mutable(function(pathname){return function(dispatch){dispatch(navigate({pathname:pathname,action:HISTORY_RESET_TO}));};});