import React, { useContext } from 'react'; import { ScrollView, StyleSheet, Platform } from 'react-native'; import { BlueHeaderDefaultSub } from '../../BlueComponents'; import loc from '../../loc'; import { BlueStorageContext } from '../../blue_modules/storage-context'; import ListItem from '../../components/ListItem'; import { useExtendedNavigation } from '../../hooks/useExtendedNavigation'; const styles = StyleSheet.create({ root: { flex: 1, }, container: Platform.select({ android: { paddingTop: 50, }, default: undefined, }), }); const Settings = () => { const { navigate } = useExtendedNavigation(); // By simply having it here, it'll re-render the UI if language is changed // eslint-disable-next-line @typescript-eslint/no-unused-vars const { language } = useContext(BlueStorageContext); return ( {Platform.OS === 'android' ? : <>} navigate('GeneralSettings')} testID="GeneralSettings" chevron /> navigate('Currency')} testID="Currency" chevron /> navigate('Language')} testID="Language" chevron /> navigate('EncryptStorage')} testID="SecurityButton" chevron /> navigate('NetworkSettings')} testID="NetworkSettings" chevron /> navigate('Tools')} testID="Tools" chevron /> navigate('About')} testID="AboutButton" chevron /> ); }; export default Settings;