d025cce982
* [Glitch] Change search pop-out in web UI Portd22e712648
to glitch-soc Signed-off-by: Plastikmensch <plastikmensch@users.noreply.github.com> * [Glitch] Change logo version in header based on screen size in web UI Port remaining change from4e6e4bcc4d
to glitch-soc Signed-off-by: Plastikmensch <plastikmensch@users.noreply.github.com> * Rename `hashtags.js` to `hashtags.ts` and apply code style changes Apply changes from6fa4054a5d
(rename to ts),0886856bd2
(code style change),9094a65fd4
(additional code style change) Signed-off-by: Plastikmensch <plastikmensch@users.noreply.github.com> * Remove strings for old search Signed-off-by: Plastikmensch <plastikmensch@users.noreply.github.com> --------- Signed-off-by: Plastikmensch <plastikmensch@users.noreply.github.com>
53 lines
995 B
JavaScript
53 lines
995 B
JavaScript
import { connect } from 'react-redux';
|
|
|
|
import {
|
|
changeSearch,
|
|
clearSearch,
|
|
submitSearch,
|
|
showSearch,
|
|
openURL,
|
|
clickSearchResult,
|
|
forgetSearchResult,
|
|
} from 'flavours/glitch/actions/search';
|
|
|
|
import Search from '../components/search';
|
|
|
|
const mapStateToProps = state => ({
|
|
value: state.getIn(['search', 'value']),
|
|
submitted: state.getIn(['search', 'submitted']),
|
|
recent: state.getIn(['search', 'recent']),
|
|
});
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
onChange (value) {
|
|
dispatch(changeSearch(value));
|
|
},
|
|
|
|
onClear () {
|
|
dispatch(clearSearch());
|
|
},
|
|
|
|
onSubmit (type) {
|
|
dispatch(submitSearch(type));
|
|
},
|
|
|
|
onShow () {
|
|
dispatch(showSearch());
|
|
},
|
|
|
|
onOpenURL (routerHistory) {
|
|
dispatch(openURL(routerHistory));
|
|
},
|
|
|
|
onClickSearchResult (q, type) {
|
|
dispatch(clickSearchResult(q, type));
|
|
},
|
|
|
|
onForgetSearchResult (q) {
|
|
dispatch(forgetSearchResult(q));
|
|
},
|
|
|
|
});
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Search);
|