How to use the @shopgate/engage/core.historyPop function in @shopgate/engage

To help you get started, we’ve selected a few @shopgate/engage 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-gmd / pages / Category / subscriptions.js View on Github external
subscribe(errorVisibleCategory$, ({ action, dispatch }) => {
    const { errorCode } = action;
    let message = 'modal.body_error';

    if (errorCode === ENOTFOUND) {
      message = 'category.error.not_found';
    }

    dispatch(showModal({
      confirm: 'modal.ok',
      dismiss: null,
      message,
      title: 'category.error.title',
    }));
    dispatch(historyPop());
  });
github shopgate / pwa / libraries / commerce / product / subscriptions / index.js View on Github external
subscribe(productNotFound$, ([{ action, dispatch }, { action: { productData } }]) => {
    const { productId } = action;
    const name = productData.id === productId ? productData.name : productId;

    dispatch(showModal({
      confirm: null,
      dismiss: 'modal.ok',
      title: 'modal.title_error',
      message: 'product.no_more_found',
      params: {
        name,
      },
    }));
    dispatch(historyPop());
    dispatch(expireProductById(productId));
  });
github shopgate / pwa / themes / theme-ios11 / pages / Category / subscriptions.js View on Github external
subscribe(errorVisibleCategory$, ({ action, dispatch }) => {
    const { errorCode } = action;
    let message = 'modal.body_error';

    if (errorCode === ENOTFOUND) {
      message = 'category.error.not_found';
    }

    dispatch(showModal({
      confirm: 'modal.ok',
      dismiss: null,
      message,
      title: 'category.error.title',
    }));
    dispatch(historyPop());
  });