@shopgate/pwa-common
Version:
Common library for the Shopgate Connect PWA.
5 lines • 383 B
JavaScript
import{ACTION_RESET}from'@virtuous/conductor';import*as actions from"../../action-creators/router";/**
* @param {Route} prev The previous route.
* @param {Route} next The next route.
* @returns {Function}
*/export function routeDidReset(prev,next){return function(dispatch){dispatch(actions.routeDidLeave(prev,ACTION_RESET));dispatch(actions.routeDidEnter(next,ACTION_RESET));};}