Fix logged out search and changed logged-in search placeholder (#19514)
This commit is contained in:
@ -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 => {
|
||||
|
Reference in New Issue
Block a user