mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-20 02:09:10 +01:00
47 lines
1.6 KiB
JavaScript
47 lines
1.6 KiB
JavaScript
import React from 'react';
|
|
import { ScrollView } from 'react-native';
|
|
import { useNavigation } from '@react-navigation/native';
|
|
import Notifications from '../../blue_modules/notifications';
|
|
import navigationStyle from '../../components/navigationStyle';
|
|
import { SafeBlueArea, BlueListItem } from '../../BlueComponents';
|
|
import loc from '../../loc';
|
|
import { isCatalyst } from '../../blue_modules/environment';
|
|
|
|
const NetworkSettings = () => {
|
|
const { navigate } = useNavigation();
|
|
|
|
const navigateToElectrumSettings = () => {
|
|
navigate('ElectrumSettings');
|
|
};
|
|
|
|
const navigateToTorSettings = () => {
|
|
navigate('TorSettings');
|
|
};
|
|
|
|
const navigateToLightningSettings = () => {
|
|
navigate('LightningSettings');
|
|
};
|
|
|
|
return (
|
|
<SafeBlueArea>
|
|
<ScrollView>
|
|
<BlueListItem title={loc.settings.network_electrum} onPress={navigateToElectrumSettings} testID="ElectrumSettings" chevron />
|
|
<BlueListItem title={loc.settings.lightning_settings} onPress={navigateToLightningSettings} testID="LightningSettings" chevron />
|
|
{Notifications.isNotificationsCapable && (
|
|
<BlueListItem
|
|
title={loc.settings.notifications}
|
|
onPress={() => navigate('NotificationSettings')}
|
|
testID="NotificationSettings"
|
|
chevron
|
|
/>
|
|
)}
|
|
{!isCatalyst && <BlueListItem title={loc.settings.tor_settings} onPress={navigateToTorSettings} testID="TorSettings" chevron />}
|
|
</ScrollView>
|
|
</SafeBlueArea>
|
|
);
|
|
};
|
|
|
|
NetworkSettings.navigationOptions = navigationStyle({}, opts => ({ ...opts, title: loc.settings.network }));
|
|
|
|
export default NetworkSettings;
|