1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
import {useNavigation} from '@react-navigation/core';
import React from 'react';
import {
SectionList,
StatusBar,
StyleSheet,
View,
SafeAreaView,
} from 'react-native';
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 {normalize} from '../../utils/layouts';
import SettingsCell from './SettingsCell';
import {SETTINGS_DATA} from '../../constants/constants';
const PrivacyScreen: React.FC = () => {
const {profile: {is_private} = NO_PROFILE} = useSelector(
(state: RootState) => state.user,
);
return (
<>
<StatusBar barStyle="light-content" />
<Background gradientType={BackgroundGradientType.Light}>
<SafeAreaView>
<View style={styles.container}>
<SectionList
sections={SETTINGS_DATA.PrivacyScreen}
keyExtractor={(item, index) => item.title + index}
renderItem={({item: {title, preimage, postimage}}) => (
<SettingsCell
{...{title, preimage, postimage, isPrivate: is_private}}
/>
)}
/>
</View>
</SafeAreaView>
</Background>
</>
);
};
const styles = StyleSheet.create({
container: {marginHorizontal: '8%', marginTop: '8%'},
});
export default PrivacyScreen;
|