diff options
| author | Ivan Chen <ivan@tagg.id> | 2021-04-09 17:15:29 -0400 |
|---|---|---|
| committer | Ivan Chen <ivan@tagg.id> | 2021-04-09 17:15:29 -0400 |
| commit | 347e9e450268e4897b8dd241721b84945d9e2ec9 (patch) | |
| tree | 58334be3724398c886365e99901e4442f5657172 /src/screens/profile/SettingsScreen.tsx | |
| parent | 097b515066f1a0c38cb7fb69cf78b16b945594e5 (diff) | |
| parent | 3ec56863bfdd47b2ee8d0f0fe5a45be779508660 (diff) | |
Merge branch 'master' into tma756-bugfix-onpress-tagg-on-sp
# Conflicts:
# src/components/taggs/TaggsBar.tsx
Diffstat (limited to 'src/screens/profile/SettingsScreen.tsx')
| -rw-r--r-- | src/screens/profile/SettingsScreen.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/screens/profile/SettingsScreen.tsx b/src/screens/profile/SettingsScreen.tsx index 05e051b5..ecc3bafd 100644 --- a/src/screens/profile/SettingsScreen.tsx +++ b/src/screens/profile/SettingsScreen.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, {useContext} from 'react'; import { SafeAreaView, SectionList, @@ -17,6 +17,7 @@ import {BackgroundGradientType} from '../../types'; import {normalize, SCREEN_HEIGHT} from '../../utils/layouts'; import SettingsCell from './SettingsCell'; import {useNavigation} from '@react-navigation/core'; +import {ChatContext} from '../../App'; const SettingsScreen: React.FC = () => { const dispatch = useDispatch(); @@ -24,6 +25,7 @@ const SettingsScreen: React.FC = () => { const {suggested_people_linked} = useSelector( (state: RootState) => state.user.profile, ); + const {chatClient} = useContext(ChatContext); return ( <> @@ -49,7 +51,7 @@ const SettingsScreen: React.FC = () => { <TouchableOpacity style={styles.logoutContainerStyles} onPress={() => { - dispatch(logout()); + dispatch(logout(chatClient)); navigation.reset({ index: 0, routes: [{name: 'SuggestedPeople'}], |
