UNPKG

@shopgate/engage

Version:
3 lines 760 B
import{connect}from'react-redux';import{getIsBackInStockEnabled,makeGetSubscriptionByCharacteristics}from'@shopgate/engage/back-in-stock/selectors';import{makeGetProductByCharacteristics}from'@shopgate/engage/product';/** * @return {Object} The extended component props. */var makeMapStateToProps=function makeMapStateToProps(){var getProductByCharacteristics=makeGetProductByCharacteristics({strict:true});var getSubscriptionByCharacteristics=makeGetSubscriptionByCharacteristics();return function(state,props){var variant=getProductByCharacteristics(state,props)||{};return{variant:variant,subscription:getSubscriptionByCharacteristics(state,props),isBackInStockEnabled:getIsBackInStockEnabled(state,props)};};};export default connect(makeMapStateToProps);