mirror of
https://github.com/ecency/ecency-mobile.git
synced 2025-01-02 19:06:39 +03:00
search white space trim
This commit is contained in:
parent
d54dc77ff5
commit
1f4b63126e
@ -46,7 +46,7 @@ const SearchModalContainer = ({
|
||||
}
|
||||
if (text && text !== '@' && text !== '#') {
|
||||
if (text[0] === '@') {
|
||||
lookupAccounts(text.substr(1)).then(res => {
|
||||
lookupAccounts(text.substr(1).trim()).then(res => {
|
||||
const users = res.map(item => ({
|
||||
image: getResizedAvatar(item),
|
||||
text: item,
|
||||
@ -55,7 +55,7 @@ const SearchModalContainer = ({
|
||||
setSearchResults({ type: 'user', data: users });
|
||||
});
|
||||
} else if (text[0] === '#') {
|
||||
getTrendingTags(text.substr(1)).then(res => {
|
||||
getTrendingTags(text.substr(1).trim()).then(res => {
|
||||
const tags = res.map(item => ({
|
||||
text: `#${get(item, 'name', '')}`,
|
||||
...item,
|
||||
|
Loading…
Reference in New Issue
Block a user