BlueWallet/screen/settings/settings.js

35 lines
1.6 KiB
JavaScript
Raw Normal View History

2019-12-24 23:44:33 -06:00
import React, { useEffect, useState } from 'react';
2020-03-28 22:06:45 -04:00
import { ScrollView, TouchableOpacity } from 'react-native';
import { BlueNavigationStyle, BlueLoading, SafeBlueArea, BlueHeaderDefaultSub, BlueListItem } from '../../BlueComponents';
import { useNavigation } from 'react-navigation-hooks';
const loc = require('../../loc');
2019-12-24 23:44:33 -06:00
const Settings = () => {
const [isLoading, setIsLoading] = useState(true);
const { navigate } = useNavigation();
useEffect(() => {
2020-03-28 22:06:45 -04:00
setIsLoading(false);
});
return isLoading ? (
<BlueLoading />
) : (
<SafeBlueArea forceInset={{ horizontal: 'always' }} style={{ flex: 1 }}>
<BlueHeaderDefaultSub leftText={loc.settings.header} rightComponent={null} />
<ScrollView>
2020-03-28 22:06:45 -04:00
<BlueListItem title={'General'} component={TouchableOpacity} onPress={() => navigate('GeneralSettings')} />
<BlueListItem title={loc.settings.currency} component={TouchableOpacity} onPress={() => navigate('Currency')} />
2020-03-29 23:41:02 -04:00
<BlueListItem title={loc.settings.language} component={TouchableOpacity} onPress={() => navigate('Language')} />
<BlueListItem title="Security" onPress={() => navigate('EncryptStorage')} component={TouchableOpacity} testID="SecurityButton" />
<BlueListItem title="Network" component={TouchableOpacity} onPress={() => navigate('NetworkSettings')} />
2020-03-19 15:51:35 +00:00
<BlueListItem title={loc.settings.about} component={TouchableOpacity} onPress={() => navigate('About')} testID="AboutButton" />
</ScrollView>
</SafeBlueArea>
);
};
2019-12-24 23:44:33 -06:00
Settings.navigationOptions = {
...BlueNavigationStyle,
};
export default Settings;