mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-16 11:53:13 +00:00
35 lines
597 B
JavaScript
35 lines
597 B
JavaScript
import { connect } from 'react-redux';
|
|
import {
|
|
changeSearch,
|
|
clearSearch,
|
|
submitSearch,
|
|
showSearch
|
|
} from '../../../actions/search';
|
|
import Search from '../components/search';
|
|
|
|
const mapStateToProps = state => ({
|
|
value: state.getIn(['search', 'value'])
|
|
});
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
onChange (value) {
|
|
dispatch(changeSearch(value));
|
|
},
|
|
|
|
onClear () {
|
|
dispatch(clearSearch());
|
|
},
|
|
|
|
onSubmit () {
|
|
dispatch(submitSearch());
|
|
},
|
|
|
|
onShow () {
|
|
dispatch(showSearch());
|
|
}
|
|
|
|
});
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Search);
|