diff options
Diffstat (limited to 'src/services/ExploreService.ts')
-rw-r--r-- | src/services/ExploreService.ts | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/src/services/ExploreService.ts b/src/services/ExploreService.ts index 07af91ad..44df8056 100644 --- a/src/services/ExploreService.ts +++ b/src/services/ExploreService.ts @@ -4,12 +4,7 @@ import { DISCOVER_ENDPOINT, SEARCH_BUTTONS_ENDPOPINT, } from '../constants'; -import {EMPTY_PROFILE_PREVIEW_LIST} from '../store/initialStates'; -import { - ExploreSectionType, - ProfilePreviewType, - SearchCategoryType, -} from '../types'; +import {ProfilePreviewType, SearchCategoryType} from '../types'; export const getAllTaggUsers = async (token: string) => { try { @@ -38,36 +33,6 @@ export const getAllTaggUsers = async (token: string) => { } }; -export const getAllExploreSections = async () => { - try { - const token = await AsyncStorage.getItem('token'); - const response = await fetch(DISCOVER_ENDPOINT, { - method: 'GET', - headers: { - Authorization: 'Token ' + token, - }, - }); - if (response.status !== 200) { - return EMPTY_PROFILE_PREVIEW_LIST; - } - const data = await response.json(); - // TODO (if we return to original explore format): get keys from backend API - const exploreSections: Record<ExploreSectionType, ProfilePreviewType[]> = { - 'New to Tagg': data.categories.new_to_tagg, - 'People You May Know': data.categories.people_you_may_know, - 'Trending on Tagg': data.categories.trending_on_tagg, - "Brown '21": data.categories.brown_21, - "Brown '22": data.categories.brown_22, - "Brown '23": data.categories.brown_23, - "Brown '24": data.categories.brown_24, - }; - - return exploreSections; - } catch (error) { - console.log('Unable to fetch explore data'); - } -}; - export const getDiscoverUsers = async (categoryName: string) => { try { const token = await AsyncStorage.getItem('token'); |