diff options
| author | Ivan Chen <ivan@tagg.id> | 2021-03-29 18:17:46 -0400 |
|---|---|---|
| committer | Ivan Chen <ivan@tagg.id> | 2021-03-29 18:17:46 -0400 |
| commit | d5669f3d08bee68b37f51727e499e84610685422 (patch) | |
| tree | 8de9664c49e63833504aafd69ca8f965249d412d /src/store | |
| parent | d1e5d18c36af46b450ec7d019550c05b1a78f2db (diff) | |
| parent | b0e4fe55be8983079f499b923e953855afeb2c64 (diff) | |
Merge branch 'master' into tma739-bugfix-profile-onboarding-tutorial
# Conflicts:
# src/components/profile/Content.tsx
Diffstat (limited to 'src/store')
| -rw-r--r-- | src/store/actions/user.ts | 2 | ||||
| -rw-r--r-- | src/store/actions/userFriends.ts | 23 |
2 files changed, 13 insertions, 12 deletions
diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts index 46f96d9a..374154da 100644 --- a/src/store/actions/user.ts +++ b/src/store/actions/user.ts @@ -1,3 +1,4 @@ +import AsyncStorage from '@react-native-community/async-storage'; import {Action, ThunkAction} from '@reduxjs/toolkit'; import { getProfilePic, @@ -157,6 +158,7 @@ export const logout = (): ThunkAction< Action<string> > => async (dispatch) => { try { + await AsyncStorage.clear(); dispatch({type: userLoggedIn.type, payload: {userId: '', username: ''}}); } catch (error) { console.log(error); diff --git a/src/store/actions/userFriends.ts b/src/store/actions/userFriends.ts index 9da3cb4a..4183d0f6 100644 --- a/src/store/actions/userFriends.ts +++ b/src/store/actions/userFriends.ts @@ -1,25 +1,24 @@ -import {getTokenOrLogout, userXInStore} from '../../utils'; -import {RootState} from '../rootReducer'; -import { - FriendshipStatusType, - ProfilePreviewType, - ScreenType, - UserType, -} from '../../types/types'; +import {Action, ThunkAction} from '@reduxjs/toolkit'; import { acceptFriendRequestService, addFriendService, + deleteFriendshipService, friendOrUnfriendUser, loadFriends, - deleteFriendshipService, } from '../../services'; -import {Action, ThunkAction} from '@reduxjs/toolkit'; import { - userFriendsFetched, + FriendshipStatusType, + ProfilePreviewType, + ScreenType, + UserType, +} from '../../types/types'; +import {getTokenOrLogout, userXInStore} from '../../utils'; +import { updateFriends, + userFriendsFetched, userXFriendshipEdited, - userLoggedIn, } from '../reducers'; +import {RootState} from '../rootReducer'; export const loadFriendsData = ( userId: string, |
