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-09-22 03:53:28 +02:00
|
|
|
import { SafeBlueArea, BlueListItem, 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 (
|
2020-05-24 11:17:26 +02:00
|
|
|
<SafeBlueArea forceInset={{ horizontal: 'always' }} style={styles.root}>
|
2020-03-30 05:41:02 +02:00
|
|
|
<ScrollView>
|
2020-09-22 03:53:28 +02:00
|
|
|
<BlueListItem title={loc.settings.network_electrum} onPress={navigateToElectrumSettings} chevron />
|
|
|
|
<BlueListItem title={loc.settings.lightning_settings} onPress={navigateToLightningSettings} chevron />
|
|
|
|
<BlueListItem 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;
|