diff options
author | ankit-thanekar007 <ankit.thanekar007@gmail.com> | 2021-03-25 13:51:14 -0700 |
---|---|---|
committer | ankit-thanekar007 <ankit.thanekar007@gmail.com> | 2021-03-29 12:07:23 -0700 |
commit | 7a521127177838bcae0cd85b2e5bd912c46406b9 (patch) | |
tree | 19a470ea25cf725bb403060f27e397344bc6b373 /src/screens/profile/PrivacyScreen.tsx | |
parent | ff3f0acadf810cd1b5bf276b9ee926f2c480b7be (diff) |
Added API for updating account toggle
Diffstat (limited to 'src/screens/profile/PrivacyScreen.tsx')
-rw-r--r-- | src/screens/profile/PrivacyScreen.tsx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/screens/profile/PrivacyScreen.tsx b/src/screens/profile/PrivacyScreen.tsx index eea0230a..37f042af 100644 --- a/src/screens/profile/PrivacyScreen.tsx +++ b/src/screens/profile/PrivacyScreen.tsx @@ -1,6 +1,6 @@ +import {useNavigation} from '@react-navigation/core'; import React from 'react'; import { - Alert, Image, SectionList, StatusBar, @@ -10,14 +10,12 @@ import { View, } from 'react-native'; import {SafeAreaView} from 'react-native-safe-area-context'; -import {normalize, SCREEN_WIDTH} from '../../utils/layouts'; +import {useSelector} from 'react-redux'; +import {RootState} from 'src/store/rootReducer'; import {Background} from '../../components'; +import {NO_PROFILE} from '../../store/initialStates'; import {BackgroundGradientType} from '../../types'; -import {logout} from '../../store/actions'; -import {useDispatch, useSelector} from 'react-redux'; -import {useNavigation} from '@react-navigation/core'; -import {RootState} from 'src/store/rootReducer'; -import {ERROR_ATTEMPT_EDIT_SP} from '../../constants/strings'; +import {normalize, SCREEN_WIDTH} from '../../utils/layouts'; const DATA = [ { @@ -39,6 +37,9 @@ const DATA = [ const PrivacyScreen: React.FC = () => { const navigation = useNavigation(); + const {profile: {is_private} = NO_PROFILE} = useSelector( + (state: RootState) => state.user, + ); const getActions = (type: string) => { switch (type) { @@ -78,7 +79,7 @@ const PrivacyScreen: React.FC = () => { <View style={[styles.item, {position: 'absolute', right: 0}]}> {title === 'Account Type' && ( <Text style={[styles.title, {color: '#C4C4C4', marginRight: 13}]}> - {'Private'} + {is_private ? 'Private' : 'Public'} </Text> )} <Image style={{width: 15, height: 15}} source={postimage} /> |