@shopgate/engage
Version:
Shopgate's ENGAGE library.
9 lines • 709 B
JavaScript
import{connect}from'react-redux';import{getProductPriceData}from'@shopgate/pwa-common-commerce/product';/**
* @param {Object} state The current application state.
* @param {Object} props The component props.
* @return {Object} The extended component props.
*/var mapStateToProps=function mapStateToProps(state,props){return{price:getProductPriceData(state,props)};};/**
* @param {Object} next The next component props.
* @param {Object} prev The current component props.
* @return {boolean}
*/var areStatePropsEqual=function areStatePropsEqual(next,prev){if(!prev.price&&next.price){return false;}return true;};export default connect(mapStateToProps,null,null,{areStatePropsEqual:areStatePropsEqual});