Rework search
This commit is contained in:
@ -1,14 +1,13 @@
|
||||
import { connect } from 'react-redux';
|
||||
import {
|
||||
changeSearch,
|
||||
clearSearchSuggestions,
|
||||
fetchSearchSuggestions,
|
||||
resetSearch
|
||||
clearSearch,
|
||||
submitSearch,
|
||||
showSearch
|
||||
} from '../../../actions/search';
|
||||
import Search from '../components/search';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
suggestions: state.getIn(['search', 'suggestions']),
|
||||
value: state.getIn(['search', 'value'])
|
||||
});
|
||||
|
||||
@ -19,15 +18,15 @@ const mapDispatchToProps = dispatch => ({
|
||||
},
|
||||
|
||||
onClear () {
|
||||
dispatch(clearSearchSuggestions());
|
||||
dispatch(clearSearch());
|
||||
},
|
||||
|
||||
onFetch (value) {
|
||||
dispatch(fetchSearchSuggestions(value));
|
||||
onSubmit () {
|
||||
dispatch(submitSearch());
|
||||
},
|
||||
|
||||
onReset () {
|
||||
dispatch(resetSearch());
|
||||
onShow () {
|
||||
dispatch(showSearch());
|
||||
}
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user