BlueWallet/screen/settings/NetworkSettings.tsx

41 lines
1.5 KiB
TypeScript
Raw Normal View History

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