UNPKG

@shopgate/engage

Version:
3 lines 817 B
import{connect}from'react-redux';import{getShopSettings}from'@shopgate/engage/core/config';import{getIsFetching,getStoreFinderSearch,getUserSearch,makeGetLocationsForStoreFinder}from"../selectors";import{selectGlobalLocation,selectLocation}from"../action-creators";/** * @returns {Function} */var makeMapStateToProps=function makeMapStateToProps(){var getLocationsForStoreFinder=makeGetLocationsForStoreFinder();return function(state,props){return{locations:getLocationsForStoreFinder(state,props),isFetching:getIsFetching(state),shopSettings:getShopSettings(state),userSearch:getUserSearch(state),storeFinderSearch:getStoreFinderSearch(state,props)};};};var mapDispatchToProps={selectLocation:selectLocation,selectGlobalLocation:selectGlobalLocation};export default connect(makeMapStateToProps,mapDispatchToProps);