@shopgate/engage
Version:
Shopgate's ENGAGE library.
7 lines • 764 B
JavaScript
import{connect}from'react-redux';import{getUserSearchPostalCode,getUserSearchCountryCode}from"../../selectors";import{setUserSearchPostalCode,setUserSearchCountryCode}from"../../action-creators";import{setUserSearchGeolocation}from"../../actions";/**
* @returns {Function}
*/function makeMapStateToProps(){/**
* @param {Object} state The application state.
* @param {Object} props The component props.
* @returns {Object}
*/return function(state){return{postalCode:getUserSearchPostalCode(state),countryCode:getUserSearchCountryCode(state)};};}var mapDispatchToProps={setPostalCode:setUserSearchPostalCode,setCountryCode:setUserSearchCountryCode,setGeolocation:setUserSearchGeolocation};export default connect(makeMapStateToProps,mapDispatchToProps);