2020-03-30 05:41:02 +02:00
|
|
|
import React, { useEffect, useState } from 'react';
|
2020-05-24 11:17:26 +02:00
|
|
|
import { ScrollView, TouchableOpacity, StyleSheet } from 'react-native';
|
2020-03-30 05:41:02 +02:00
|
|
|
import { BlueNavigationStyle, BlueLoading, SafeBlueArea, BlueListItem } from '../../BlueComponents';
|
2020-05-27 13:12:17 +02:00
|
|
|
import { useNavigation } from '@react-navigation/native';
|
2020-03-30 05:41:02 +02:00
|
|
|
const loc = require('../../loc');
|
|
|
|
|
2020-05-24 11:17:26 +02:00
|
|
|
const styles = StyleSheet.create({
|
|
|
|
root: {
|
|
|
|
flex: 1,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2020-03-30 05:41:02 +02:00
|
|
|
const NetworkSettings = () => {
|
|
|
|
const [isLoading, setIsLoading] = useState(true);
|
|
|
|
const { navigate } = useNavigation();
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
setIsLoading(false);
|
2020-04-02 18:47:13 +02:00
|
|
|
}, []);
|
2020-03-30 05:41:02 +02:00
|
|
|
|
|
|
|
return isLoading ? (
|
|
|
|
<BlueLoading />
|
|
|
|
) : (
|
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-05-28 10:44:15 +02:00
|
|
|
<BlueListItem title={'Electrum server'} component={TouchableOpacity} onPress={() => navigate('ElectrumSettings')} chevron />
|
|
|
|
<BlueListItem
|
|
|
|
title={loc.settings.lightning_settings}
|
|
|
|
component={TouchableOpacity}
|
|
|
|
onPress={() => navigate('LightningSettings')}
|
|
|
|
chevron
|
|
|
|
/>
|
|
|
|
<BlueListItem title="Broadcast transaction" component={TouchableOpacity} onPress={() => navigate('Broadcast')} chevron />
|
2020-03-30 05:41:02 +02:00
|
|
|
</ScrollView>
|
|
|
|
</SafeBlueArea>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
NetworkSettings.navigationOptions = {
|
|
|
|
...BlueNavigationStyle(),
|
|
|
|
title: 'Network',
|
|
|
|
};
|
|
|
|
export default NetworkSettings;
|