Fix logged out search and changed logged-in search placeholder (#19514)

This commit is contained in:
Eugen Rochko
2022-10-29 13:32:49 +02:00
committed by GitHub
parent e6d415bb1f
commit 55af04b253
2 changed files with 7 additions and 3 deletions

View File

@ -29,7 +29,8 @@ export function clearSearch() {
export function submitSearch() {
return (dispatch, getState) => {
const value = getState().getIn(['search', 'value']);
const value = getState().getIn(['search', 'value']);
const signedIn = !!getState().getIn(['meta', 'me']);
if (value.length === 0) {
dispatch(fetchSearchSuccess({ accounts: [], statuses: [], hashtags: [] }, ''));
@ -41,7 +42,7 @@ export function submitSearch() {
api(getState).get('/api/v2/search', {
params: {
q: value,
resolve: true,
resolve: signedIn,
limit: 5,
},
}).then(response => {