diff options
| author | Ivan Chen <ivan@thetaggid.com> | 2021-02-01 12:24:45 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-01 12:24:45 -0500 |
| commit | 7a09cc96bf1fe468a612bb44362bbef24fccc773 (patch) | |
| tree | f2d65dddf647729c08878db0dfb6a80892bf7d69 /src/store | |
| parent | b7509400433169e698450e4a7667d268439dcf41 (diff) | |
| parent | 85c9a80e8867ff5303bfcc49b79b8bc5f25a2f61 (diff) | |
Merge pull request #210 from ashmgarv/hotfixes
[HOTFIX] Fix for chaching and comments notification navigation
Diffstat (limited to 'src/store')
| -rw-r--r-- | src/store/actions/userX.ts | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/src/store/actions/userX.ts b/src/store/actions/userX.ts index af8188f1..07bea678 100644 --- a/src/store/actions/userX.ts +++ b/src/store/actions/userX.ts @@ -1,4 +1,3 @@ -import {UserXSpecifics} from './../../types/types'; import {userXInStore} from './../../utils/'; import {getTokenOrLogout, loadAllSocialsForUser} from './../../utils'; import {UserType, ScreenType} from '../../types/types'; @@ -86,86 +85,6 @@ export const loadUserX = ( } }; -export const loadUserXSpecifics = ( - user: UserType, - specifics: UserXSpecifics[], - screenType: ScreenType, -): ThunkAction<Promise<void>, RootState, unknown, Action<string>> => async ( - dispatch, -) => { - const {userId} = user; - await dispatch({type: userXRequested.type, payload: {screenType, userId}}); - await dispatch({ - type: userXUserFetched.type, - payload: {screenType, userId, user}, - }); - const token = await getTokenOrLogout(dispatch); - for (let specific of specifics) { - switch (specific) { - case 'Profile': - console.log(specific); - loadProfileInfo(token, userId).then((data) => { - dispatch({ - type: userXProfileFetched.type, - payload: {screenType, userId, data}, - }); - }); - break; - case 'Socials': - loadAllSocialsForUser(userId).then((data) => - dispatch({ - type: userXSocialsFetched.type, - payload: {screenType, userId, data}, - }), - ); - break; - case 'Avatar': - loadAvatar(userId, false).then((data) => - dispatch({ - type: userXAvatarFetched.type, - payload: {screenType, userId, data}, - }), - ); - break; - case 'Cover': - loadCover(token, userId).then((data) => - dispatch({ - type: userXCoverFetched.type, - payload: {screenType, userId, data}, - }), - ); - break; - case 'Friends': - loadFriends(userId, token).then((data) => - dispatch({ - type: userXFriendsFetched.type, - payload: {screenType, userId, data}, - }), - ); - break; - case 'Moments': - console.log(specific); - loadMoments(userId, token).then((data) => - dispatch({ - type: userXMomentsFetched.type, - payload: {screenType, userId, data}, - }), - ); - break; - case 'MomentCategories': - loadMomentCategories(userId, token).then((data) => { - dispatch({ - type: userXMomentCategoriesFetched.type, - payload: {screenType, userId, data}, - }); - }); - break; - default: - break; - } - } -}; - export const updateUserXFriends = ( userId: string, state: RootState, |
