35 lines
634 B
JavaScript
Raw Normal View History

2019-07-02 03:10:25 -04:00
import {
changeSearch,
clearSearch,
submitSearch,
showSearch,
} from '../../../actions/search';
2019-08-13 11:54:29 -04:00
import ComposeSearch from '../components/compose_search';
2019-07-02 03:10:25 -04:00
const mapStateToProps = state => ({
value: state.getIn(['search', 'value']),
submitted: state.getIn(['search', 'submitted']),
});
const mapDispatchToProps = dispatch => ({
onChange (value) {
dispatch(changeSearch(value));
},
onClear () {
dispatch(clearSearch());
},
onSubmit () {
dispatch(submitSearch());
},
onShow () {
dispatch(showSearch());
},
});
2019-08-13 11:54:29 -04:00
export default connect(mapStateToProps, mapDispatchToProps)(ComposeSearch);