diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-07 16:36:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-07 16:36:34 -0400 |
commit | 4cf3bc720ebcc0b16d158caf60fbdf091621c327 (patch) | |
tree | 97d8db434060a7bf8579bb2975f9be25331ecb73 /src/screens/profile/SettingsScreen.tsx | |
parent | a3abb3abe322ea84306e1a12cec46972a81a37de (diff) | |
parent | 6db092b4b88a71c53088a14e330ec73e208ad958 (diff) |
Merge pull request #354 from TaggiD-Inc/chat-poc
[POC] Chat
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'}], |