How to use the @shopgate/engage/core.hex2bin 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-ios11 / pages / Category / subscriptions.js View on Github external
subscribe(categoryWillEnter$, ({ dispatch, action }) => {
    const { filters, offset = 0 } = action.route.state;
    const categoryId = hex2bin(action.route.params.categoryId);

    dispatch(fetchCategory(categoryId));
    dispatch(fetchCategoryProducts({
      categoryId,
      filters,
      offset,
    }));
  });
github shopgate / pwa / themes / theme-gmd / pages / Category / subscriptions.js View on Github external
subscribe(categoryWillEnter$, ({ dispatch, action }) => {
    const { filters, offset = 0 } = action.route.state;
    const categoryId = hex2bin(action.route.params.categoryId);

    dispatch(fetchCategory(categoryId));
    dispatch(fetchCategoryProducts({
      categoryId,
      filters,
      offset,
    }));
  });
github shopgate / pwa / themes / theme-gmd / pages / Category / subscriptions.js View on Github external
subscribe(categoryFiltersDidUpdate$, ({ action, dispatch, getState }) => {
    const { params, state: { offset = 0 } } = getCurrentRoute(getState());
    const categoryId = hex2bin(params.categoryId);
    const { filters } = action;

    dispatch(fetchCategoryProducts({
      categoryId,
      filters,
      offset,
    }));
  });
}
github shopgate / pwa / libraries / tracking / selectors / category.js View on Github external
(state, pattern, categoryId, rootCategories) => {
      const decodedCategoryId = categoryId ? hex2bin(categoryId) : null;

      if (pattern === ROOT_CATEGORY_PATTERN) {
        return createRootCategoryData(rootCategories);
      } if (pattern === CATEGORY_PATTERN && decodedCategoryId) {
        return createCategoryData(getCategory(state, { categoryId: decodedCategoryId }));
      }

      return null;
    }
  );
github shopgate / pwa / themes / theme-gmd / pages / Product / index.jsx View on Github external
consumeRenderer = ({ open, id, state }) => {
    if (!open) {
      return null;
    }

    const productId = state.productId || hex2bin(id);

    return ;
  }
github shopgate / pwa / libraries / tracking / selectors / product.js View on Github external
(state, pattern, productId) => {
      const decodedProductId = productId ? hex2bin(productId) : null;

      if (pattern === ITEM_PATTERN && decodedProductId) {
        return getProductFormatted(state, { productId: decodedProductId });
      }

      return null;
    }
  );
github shopgate / pwa / themes / theme-ios11 / pages / Category / subscriptions.js View on Github external
subscribe(categoryFiltersDidUpdate$, ({ action, dispatch, getState }) => {
    const { params, state: { offset = 0 } } = getCurrentRoute(getState());
    const categoryId = hex2bin(params.categoryId);
    const { filters } = action;

    dispatch(fetchCategoryProducts({
      categoryId,
      filters,
      offset,
    }));
  });
}