aboutsummaryrefslogtreecommitdiff
path: root/src/store/actions
diff options
context:
space:
mode:
authorIvan Chen <ivan@thetaggid.com>2021-01-13 02:58:24 -0500
committerGitHub <noreply@github.com>2021-01-13 02:58:24 -0500
commit353c1ec685698bb86e0ff96a346d88205ee389cf (patch)
tree021f721cc8eb94ab007183c39d808e9eb3a468e8 /src/store/actions
parent5664f30a218af4620be69c66f4aba93d5972f890 (diff)
[TMA-531] New Explore Page (#179)
* redux done * done * added refresh control * added profile navigation * minor spacing change
Diffstat (limited to 'src/store/actions')
-rw-r--r--src/store/actions/taggUsers.ts10
1 files changed, 4 insertions, 6 deletions
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<void>,
@@ -11,12 +10,11 @@ export const loadRecentlySearched = (): ThunkAction<
Action<string>
> => 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);