UNPKG

@shopgate/engage

Version:
9 lines 735 B
import{connect}from'react-redux';import{getProductShipping}from'@shopgate/pwa-common-commerce/product/selectors/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{shipping:getProductShipping(state,props)};};/** * @param {Object} next The next component props. * @param {Object} prev The previous component props. * @return {boolean} */var areStatePropsEqual=function areStatePropsEqual(next,prev){if(!prev.shipping&&next.shipping){return false;}return true;};export default connect(mapStateToProps,null,null,{areStatePropsEqual:areStatePropsEqual});