gab-social/app/javascript/gabsocial/features/compose/containers/search_container.js

35 lines
634 B
JavaScript
Raw Normal View History

2019-07-02 08:10:25 +01:00
import {
changeSearch,
clearSearch,
submitSearch,
showSearch,
} from '../../../actions/search';
2019-08-13 16:54:29 +01:00
import ComposeSearch from '../components/compose_search';
2019-07-02 08:10:25 +01: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 16:54:29 +01:00
export default connect(mapStateToProps, mapDispatchToProps)(ComposeSearch);