BlueWallet/screen/settings/NetworkSettings.js

44 lines
1.3 KiB
JavaScript
Raw Normal View History

2020-07-20 15:38:46 +02:00
import React from 'react';
2020-07-15 19:32:59 +02:00
import { ScrollView, StyleSheet } from 'react-native';
2020-07-20 15:38:46 +02:00
import { SafeBlueArea, BlueListItemHooks, BlueNavigationStyle } from '../../BlueComponents';
2020-07-15 19:32:59 +02:00
import { useNavigation, useTheme } from '@react-navigation/native';
2020-07-20 15:38:46 +02:00
import loc from '../../loc';
2020-03-30 05:41:02 +02:00
const NetworkSettings = () => {
const { navigate } = useNavigation();
2020-07-15 19:32:59 +02:00
const { colors } = useTheme();
const styles = StyleSheet.create({
root: {
flex: 1,
backgroundColor: colors.background,
},
});
2020-03-30 05:41:02 +02:00
2020-07-15 19:32:59 +02:00
const navigateToElectrumSettings = () => {
navigate('ElectrumSettings');
};
const navigateToLightningSettings = () => {
navigate('LightningSettings');
};
const navigateToBroadcast = () => {
navigate('Broadcast');
};
2020-07-20 15:38:46 +02:00
return (
<SafeBlueArea forceInset={{ horizontal: 'always' }} style={styles.root}>
2020-03-30 05:41:02 +02:00
<ScrollView>
2020-07-20 15:38:46 +02:00
<BlueListItemHooks title={loc.settings.network_electrum} onPress={navigateToElectrumSettings} chevron />
2020-07-15 19:32:59 +02:00
<BlueListItemHooks title={loc.settings.lightning_settings} onPress={navigateToLightningSettings} chevron />
2020-07-20 15:38:46 +02:00
<BlueListItemHooks title={loc.settings.network_broadcast} onPress={navigateToBroadcast} chevron />
2020-03-30 05:41:02 +02:00
</ScrollView>
</SafeBlueArea>
);
};
2020-07-15 19:32:59 +02:00
NetworkSettings.navigationOptions = () => ({
2020-03-30 05:41:02 +02:00
...BlueNavigationStyle(),
2020-07-20 15:38:46 +02:00
title: loc.settings.network,
2020-07-15 19:32:59 +02:00
});
2020-03-30 05:41:02 +02:00
export default NetworkSettings;