aboutsummaryrefslogtreecommitdiff
path: root/src/utils/search.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/search.ts')
-rw-r--r--src/utils/search.ts11
1 files changed, 10 insertions, 1 deletions
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;
+};