BlueWallet/screen/settings/NetworkSettings.tsx

41 lines
1.5 KiB
TypeScript
Raw Permalink Normal View History

2020-07-20 15:38:46 +02:00
import React from 'react';
import { ScrollView } from 'react-native';
import { isNotificationsCapable } from '../../blue_modules/notifications';
2023-12-16 22:44:35 +01:00
import ListItem from '../../components/ListItem';
2024-05-20 11:54:13 +02:00
import loc from '../../loc';
import { useExtendedNavigation } from '../../hooks/useExtendedNavigation';
2020-07-20 15:38:46 +02:00
const NetworkSettings: React.FC = () => {
const navigation = useExtendedNavigation();
2020-03-30 05:41:02 +02:00
2020-07-15 19:32:59 +02:00
const navigateToElectrumSettings = () => {
navigation.navigate('ElectrumSettings');
2020-07-15 19:32:59 +02:00
};
const navigateToLightningSettings = () => {
navigation.navigate('LightningSettings');
};
const navigateToBlockExplorerSettings = () => {
navigation.navigate('SettingsBlockExplorer');
2020-07-15 19:32:59 +02:00
};
2020-07-20 15:38:46 +02:00
return (
2024-01-13 15:56:29 +01:00
<ScrollView contentInsetAdjustmentBehavior="automatic" automaticallyAdjustContentInsets>
<ListItem title={loc.settings.block_explorer} onPress={navigateToBlockExplorerSettings} testID="BlockExplorerSettings" chevron />
2024-01-13 15:56:29 +01:00
<ListItem title={loc.settings.network_electrum} onPress={navigateToElectrumSettings} testID="ElectrumSettings" chevron />
<ListItem title={loc.settings.lightning_settings} onPress={navigateToLightningSettings} testID="LightningSettings" chevron />
{isNotificationsCapable && (
2024-01-13 15:56:29 +01:00
<ListItem
title={loc.settings.notifications}
onPress={() => navigation.navigate('NotificationSettings')}
2024-01-13 15:56:29 +01:00
testID="NotificationSettings"
chevron
/>
)}
</ScrollView>
2020-03-30 05:41:02 +02:00
);
};
2020-12-25 17:09:53 +01:00
2020-03-30 05:41:02 +02:00
export default NetworkSettings;