ebfa184e74
* [Glitch] Change search pop-out in web UI Port2b11376411
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 from6028d047b9
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 frome38b391940
(rename to ts),51b83ed195
(code style change),73b64b8917
(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>
54 lines
995 B
JavaScript
54 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);
|