From 353c1ec685698bb86e0ff96a346d88205ee389cf Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Wed, 13 Jan 2021 02:58:24 -0500 Subject: [TMA-531] New Explore Page (#179) * redux done * done * added refresh control * added profile navigation * minor spacing change --- src/store/actions/taggUsers.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/store/actions') diff --git a/src/store/actions/taggUsers.ts b/src/store/actions/taggUsers.ts index 7f841c51..7b6d4d5e 100644 --- a/src/store/actions/taggUsers.ts +++ b/src/store/actions/taggUsers.ts @@ -1,8 +1,7 @@ -import {RootState} from '../rootReducer'; -import {loadRecentlySearchedUsers, getAllTaggUsers} from '../../services'; import {Action, ThunkAction} from '@reduxjs/toolkit'; +import {getAllExploreSections, loadRecentlySearchedUsers} from '../../services'; import {taggUsersFetched} from '../reducers'; -import {getTokenOrLogout} from '../../utils'; +import {RootState} from '../rootReducer'; export const loadRecentlySearched = (): ThunkAction< Promise, @@ -11,12 +10,11 @@ export const loadRecentlySearched = (): ThunkAction< Action > => async (dispatch) => { try { - const token = await getTokenOrLogout(dispatch); const recentSearches = await loadRecentlySearchedUsers(); - const taggUsers = await getAllTaggUsers(token); + const exploreSections = await getAllExploreSections(); dispatch({ type: taggUsersFetched.type, - payload: {recentSearches, taggUsers}, + payload: {recentSearches, explores: exploreSections}, }); } catch (error) { console.log(error); -- cgit v1.2.3-70-g09d2