How to use the @shopgate/pwa-common/actions/router.historyPush function in @shopgate/pwa-common

To help you get started, we’ve selected a few @shopgate/pwa-common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shopgate / pwa / themes / theme-ios11 / pages / Browse / components / SearchField / connector.js View on Github external
  submitSearch: query => dispatch(historyPush({
    pathname: `${SEARCH_PATH}?s=${encodeURIComponent(query)}`,
  })),
  openScanner: () => dispatch(historyPush({
github shopgate / pwa / themes / theme-gmd / components / NavDrawer / components / QuickLinks / connector.js View on Github external
  navigate: (pathname, title) => dispatch(historyPush({
    pathname,
    state: { title },
  })),
});
github shopgate / pwa / themes / theme-ios11 / components / FilterBar / components / Content / actions / openFilterRoute.js View on Github external
} = getCurrentRoute(getState());

  const forwardState = {
    filters: state.filters || null,
    parentId: id,
  };

  if (categoryId) {
    dispatch(historyPush({
      pathname: `${CATEGORY_PATH}/${categoryId}/filter`,
      state: forwardState,
    }));
  } else if (query.s) {
    const queryString = parseObjectToQueryString(query);

    dispatch(historyPush({
      pathname: `${SEARCH_PATH}/filter${queryString}`,
      state: forwardState,
    }));
  }
};
github shopgate / pwa / libraries / engage / product / components / MediaSlider / connector.js View on Github external
navigate: currentSlide =>
    dispatch(historyPush({
      pathname: `${ITEM_PATH}/${bin2hex(props.productId)}/gallery/${currentSlide}`,
    })),
});
github shopgate / pwa / themes / theme-gmd / components / NavDrawer / connector.js View on Github external
  navigate: (pathname, title) => () => dispatch(historyPush({
    pathname,
    state: { title },
  })),
});
github shopgate / pwa / themes / theme-ios11 / components / TabBar / components / actions.js View on Github external
export const navigate = params => (dispatch, getState) => {
  dispatch(historyPush({
    ...params,
    state: {
      ...params.state,
      preventA11yFocus: isTabBarVisible(getState(), params.pathname),
    },
  }));
};