UNPKG

@shopgate/pwa-tracking

Version:

Tracking library for the Shopgate Connect PWA.

10 lines (9 loc) 423 B
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, favorites => favorites.map(product => formatProductData(product)));