fix wunderbar search suggestions

This commit is contained in:
zxawry 2019-07-04 12:05:21 +01:00
parent c103616224
commit d23d06646e
No known key found for this signature in database
GPG key ID: 70F5D1B4F51F051A

View file

@ -3,12 +3,10 @@ import {
doFocusSearchInput, doFocusSearchInput,
doBlurSearchInput, doBlurSearchInput,
doUpdateSearchQuery, doUpdateSearchQuery,
doSearch,
doToast, doToast,
selectSearchValue, selectSearchValue,
selectSearchSuggestions, selectSearchSuggestions,
selectSearchBarFocused, selectSearchBarFocused,
parseURI,
} from 'lbry-redux'; } from 'lbry-redux';
import analytics from 'analytics'; import analytics from 'analytics';
import Wunderbar from './view'; import Wunderbar from './view';
@ -24,6 +22,7 @@ const select = state => ({
const perform = (dispatch, ownProps) => ({ const perform = (dispatch, ownProps) => ({
onSearch: query => { onSearch: query => {
ownProps.history.push({ pathname: `/$/search`, search: `?q=${encodeURIComponent(query)}` }); ownProps.history.push({ pathname: `/$/search`, search: `?q=${encodeURIComponent(query)}` });
dispatch(doUpdateSearchQuery(query));
analytics.apiLogSearch(); analytics.apiLogSearch();
}, },
onSubmit: uri => { onSubmit: uri => {