Implement shop search and refactor
This commit is contained in:
@@ -16,7 +16,7 @@ class CoMarketCatalogSelect extends Component {
|
||||
|
||||
}
|
||||
componentDidMount() {
|
||||
this.props.dispatch(fetchShops());
|
||||
this.props.dispatch(fetchShops(this.props.userInfo.wiaas_id_user));
|
||||
|
||||
if(this.props.shops && this.props.cartItems && this.props.activeModule==='cart'){
|
||||
const cartShop = this.props.shops.find( shop => { return shop.id===this.props.cartItems[0].idCommercialLead });
|
||||
@@ -80,7 +80,8 @@ const mapStateToProps = (state) => ({
|
||||
selectedShop: state.coMarketPackagesReducer.selectedShop,
|
||||
idPackage: state.coMarketReducer.idPackage,
|
||||
cartItems: state.cartReducer.cartItems,
|
||||
activeSubmodule: state.pageReducer.activeSubmodule
|
||||
activeSubmodule: state.pageReducer.activeSubmodule,
|
||||
userInfo: state.auth.userInfo
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps)(CoMarketCatalogSelect);
|
||||
|
||||
Reference in New Issue
Block a user