export default store => {
  store.subscribe(async mutation => {
    // load eshop Listing defaults
    if (mutation.type === 'route/ROUTE_CHANGED') {
      if (typeof jQuery !== 'undefined') {
        jQuery('html, body').animate({ scrollTop: 0 }, 'slow')
      } else {
        window.scrollTo(0, 0)
      }
    }
  })
}
