diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/constants/index.ts | 1 | ||||
-rw-r--r-- | src/utils/search.ts | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/constants/index.ts b/src/constants/index.ts index a9cfe947..96ed3fb0 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -1,3 +1,4 @@ export * from './api'; export * from './constants'; export * from './regex'; +export * from './badges'; diff --git a/src/utils/search.ts b/src/utils/search.ts index 26f40b1b..b3abce9c 100644 --- a/src/utils/search.ts +++ b/src/utils/search.ts @@ -1,6 +1,7 @@ import AsyncStorage from '@react-native-community/async-storage'; +import {loadSearchResults} from '../services'; -import {BADGE_DATA} from '../constants/badges'; +import {BADGE_DATA, SEARCH_ENDPOINT_SUGGESTED} from '../constants'; import { ProfilePreviewType, CategoryPreviewType, @@ -138,3 +139,11 @@ export const getRecentlySearchedCategories = async (): Promise< } return []; }; + +/* + * Retrieves and returns a list of suggested tagg users + */ +export const loadTaggUserSuggestions = async () => { + const searchResults = await loadSearchResults(`${SEARCH_ENDPOINT_SUGGESTED}`); + return searchResults?.users; +}; |