diff options
author | ankit-thanekar007 <ankit.thanekar007@gmail.com> | 2021-03-29 13:07:51 -0700 |
---|---|---|
committer | ankit-thanekar007 <ankit.thanekar007@gmail.com> | 2021-03-29 13:07:51 -0700 |
commit | bc1f377dfe4033f2fad28b7852dc09a72e0bd43e (patch) | |
tree | 721015410c6ea4b0e1a443a0d489f8a578ae8a11 /src | |
parent | 3802fbd5d7f7c9ca70060f53af993356d946483d (diff) |
Logout remaining
Diffstat (limited to 'src')
-rw-r--r-- | src/screens/profile/AccountType.tsx | 38 | ||||
-rw-r--r-- | src/screens/profile/PrivacyScreen.tsx | 5 | ||||
-rw-r--r-- | src/screens/profile/SettingsScreen.tsx | 9 |
3 files changed, 25 insertions, 27 deletions
diff --git a/src/screens/profile/AccountType.tsx b/src/screens/profile/AccountType.tsx index 8c700cef..60ed0668 100644 --- a/src/screens/profile/AccountType.tsx +++ b/src/screens/profile/AccountType.tsx @@ -51,25 +51,23 @@ const AccountType: React.FC = () => { <Background gradientType={BackgroundGradientType.Light}> <SafeAreaView> <View style={styles.container}> - <View> + <View style={styles.switchContainerStyle}> <Text style={styles.title}>{getAccountText()}</Text> - <View style={styles.switchContainerStyle}> - <ActivityIndicator - animating={isLoading} - size="small" - color="black" + <ActivityIndicator + animating={isLoading} + size="small" + color="white" + /> + {!isLoading && ( + <Switch + trackColor={{false: 'red', true: '#6EE7E7'}} + thumbColor={'white'} + ios_backgroundColor="transparent" + style={styles.switchStyles} + value={is_private} + onValueChange={updateAccountVisibility} /> - {!isLoading && ( - <Switch - trackColor={{false: 'red', true: '#6EE7E7'}} - thumbColor={'white'} - ios_backgroundColor="transparent" - style={styles.switchStyles} - value={is_private} - onValueChange={updateAccountVisibility} - /> - )} - </View> + )} </View> <View style={styles.detailContainerStyle}> @@ -93,6 +91,7 @@ const AccountType: React.FC = () => { const styles = StyleSheet.create({ container: {marginHorizontal: '8%', marginTop: '20%'}, title: { + alignSelf: 'center', fontSize: normalize(18), fontWeight: '600', lineHeight: normalize(17.9), @@ -100,9 +99,8 @@ const styles = StyleSheet.create({ }, switchContainerStyle: { flexDirection: 'row', - alignItems: 'center', - position: 'absolute', - right: 0, + alignContent: 'center', + justifyContent: 'space-between', }, detailContainerStyle: {marginTop: '40%'}, detailTitleStyle: { diff --git a/src/screens/profile/PrivacyScreen.tsx b/src/screens/profile/PrivacyScreen.tsx index d91c7841..17872e24 100644 --- a/src/screens/profile/PrivacyScreen.tsx +++ b/src/screens/profile/PrivacyScreen.tsx @@ -1,4 +1,3 @@ -import {useNavigation} from '@react-navigation/core'; import React from 'react'; import { SectionList, @@ -12,7 +11,7 @@ import {RootState} from 'src/store/rootReducer'; import {Background} from '../../components'; import {NO_PROFILE} from '../../store/initialStates'; import {BackgroundGradientType} from '../../types'; -import {normalize} from '../../utils/layouts'; +import {SCREEN_HEIGHT} from '../../utils/layouts'; import SettingsCell from './SettingsCell'; import {SETTINGS_DATA} from '../../constants/constants'; @@ -44,7 +43,7 @@ const PrivacyScreen: React.FC = () => { }; const styles = StyleSheet.create({ - container: {marginHorizontal: '8%', marginTop: '8%'}, + container: {height: SCREEN_HEIGHT, marginHorizontal: '8%', marginTop: '8%'}, }); export default PrivacyScreen; diff --git a/src/screens/profile/SettingsScreen.tsx b/src/screens/profile/SettingsScreen.tsx index cb049a96..88962f71 100644 --- a/src/screens/profile/SettingsScreen.tsx +++ b/src/screens/profile/SettingsScreen.tsx @@ -1,20 +1,20 @@ import React from 'react'; import { + SafeAreaView, SectionList, StatusBar, StyleSheet, Text, TouchableOpacity, - SafeAreaView, View, } from 'react-native'; import {useSelector} from 'react-redux'; import {RootState} from 'src/store/rootReducer'; import {Background} from '../../components'; +import {SETTINGS_DATA} from '../../constants/constants'; import {BackgroundGradientType} from '../../types'; -import {normalize} from '../../utils/layouts'; +import {normalize, SCREEN_HEIGHT} from '../../utils/layouts'; import SettingsCell from './SettingsCell'; -import {SETTINGS_DATA} from '../../constants/constants'; const SettingsScreen: React.FC = () => { const {suggested_people_linked} = useSelector( @@ -28,6 +28,7 @@ const SettingsScreen: React.FC = () => { <SafeAreaView> <View style={styles.container}> <SectionList + stickySectionHeadersEnabled={false} sections={SETTINGS_DATA.SettingsAndPrivacy} keyExtractor={(item, index) => item.title + index} renderItem={({item: {title, preimage, postimage}}) => ( @@ -56,7 +57,7 @@ const SettingsScreen: React.FC = () => { }; const styles = StyleSheet.create({ - container: {marginHorizontal: '8%', marginTop: '8%'}, + container: {height: SCREEN_HEIGHT, marginHorizontal: '8%', marginTop: '8%'}, headerContainerStyles: {marginTop: '14%'}, headerTextStyles: { fontSize: normalize(18), |