@shopgate/pwa-tracking
Version:
Tracking library for the Shopgate Connect PWA.
5 lines • 434 B
JavaScript
import{createSelector}from'reselect';import{getFavorites}from'@shopgate/pwa-common-commerce/favorites/selectors';import{formatProductData}from"../helpers";/**
* Selects the favorites information.
* @param {Object} state The current state.
* @returns {Object} The favorites information.
*/export default createSelector(getFavorites,function(favorites){return favorites.map(function(product){return formatProductData(product);});});