import React, {Component} from 'react'; import {connect} from 'react-redux'; import {Row, Col, Input} from 'reactstrap'; import {fetchShopPackages} from '../../actions/coMarket/coMarketPackagesActions'; import {coMarketTexts} from '../../constants/coMarketConstants'; class CoMarketNavContainer extends Component { constructor(props) { super(props); this.handleSearchChange = this.handleSearchChange.bind(this); this.state = { searchValue : '' }; } handleSearchChange(event) { this.setState({searchValue: event.target.value}); if (this.props.selectedShop) { this.props.dispatch(fetchShopPackages(this.props.selectedShop, event.target.value)); } } render() { return (
{coMarketTexts.labels.NEW_PRODUCTS}
); } } const mapStateToProps = (state) => ({ selectedShop: state.coMarketPackagesReducer.selectedShop }); export default connect(mapStateToProps)(CoMarketNavContainer);