diff options
author | Ivan Chen <ivan@tagg.id> | 2021-03-11 18:19:32 -0500 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-03-11 18:19:32 -0500 |
commit | e63394198f554c7a302c12d8c540c1d730f65d86 (patch) | |
tree | fc56df9e55e93159f41bce6b77491bfd74b7037e | |
parent | aa601cd9b35778408b7efdf1eaeca7c0a38d092f (diff) |
removed unused store state
-rw-r--r-- | src/store/actions/taggUsers.ts | 4 | ||||
-rw-r--r-- | src/store/initialStates.ts | 14 | ||||
-rw-r--r-- | src/store/reducers/taggUsersReducer.ts | 1 |
3 files changed, 2 insertions, 17 deletions
diff --git a/src/store/actions/taggUsers.ts b/src/store/actions/taggUsers.ts index 7b6d4d5e..72ce848b 100644 --- a/src/store/actions/taggUsers.ts +++ b/src/store/actions/taggUsers.ts @@ -11,10 +11,10 @@ export const loadRecentlySearched = (): ThunkAction< > => async (dispatch) => { try { const recentSearches = await loadRecentlySearchedUsers(); - const exploreSections = await getAllExploreSections(); + getAllExploreSections(); dispatch({ type: taggUsersFetched.type, - payload: {recentSearches, explores: exploreSections}, + payload: {recentSearches}, }); } catch (error) { console.log(error); diff --git a/src/store/initialStates.ts b/src/store/initialStates.ts index 1a3db433..b43e4a1d 100644 --- a/src/store/initialStates.ts +++ b/src/store/initialStates.ts @@ -69,22 +69,8 @@ export const NO_SOCIAL_ACCOUNTS: Record<string, SocialAccountType> = { Twitter: {posts: []}, }; -export const EMPTY_EXPLORE_SECTIONS: Record< - ExploreSectionType, - ProfilePreviewType[] -> = { - 'People You May Know': EMPTY_PROFILE_PREVIEW_LIST, - 'New to Tagg': EMPTY_PROFILE_PREVIEW_LIST, - 'Trending on Tagg': EMPTY_PROFILE_PREVIEW_LIST, - "Brown '21": EMPTY_PROFILE_PREVIEW_LIST, - "Brown '22": EMPTY_PROFILE_PREVIEW_LIST, - "Brown '23": EMPTY_PROFILE_PREVIEW_LIST, - "Brown '24": EMPTY_PROFILE_PREVIEW_LIST, -}; - export const NO_TAGG_USERS = { recentSearches: EMPTY_PROFILE_PREVIEW_LIST, - explores: EMPTY_EXPLORE_SECTIONS, }; export const NO_SOCIALS = { diff --git a/src/store/reducers/taggUsersReducer.ts b/src/store/reducers/taggUsersReducer.ts index 33e2e18d..92973101 100644 --- a/src/store/reducers/taggUsersReducer.ts +++ b/src/store/reducers/taggUsersReducer.ts @@ -7,7 +7,6 @@ const taggUsersSlice = createSlice({ reducers: { taggUsersFetched: (state, action) => { state.recentSearches = action.payload.recentSearches; - state.explores = action.payload.explores; }, }, }); |