2020-07-20 16:38:46 +03:00
|
|
|
import React from 'react';
|
2021-03-22 07:54:17 -04:00
|
|
|
import { ScrollView } from 'react-native';
|
2024-09-17 22:00:58 -04:00
|
|
|
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';
|
2024-09-17 22:00:58 -04:00
|
|
|
import { useExtendedNavigation } from '../../hooks/useExtendedNavigation';
|
2020-07-20 16:38:46 +03:00
|
|
|
|
2024-09-17 22:00:58 -04: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 = () => {
|
2024-09-17 22:00:58 -04:00
|
|
|
navigation.navigate('ElectrumSettings');
|
2020-07-15 13:32:59 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
const navigateToLightningSettings = () => {
|
2024-09-17 22:00:58 -04:00
|
|
|
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>
|
2024-09-17 22:00:58 -04:00
|
|
|
<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 />
|
2024-09-17 22:00:58 -04:00
|
|
|
{isNotificationsCapable && (
|
2024-01-13 10:56:29 -04:00
|
|
|
<ListItem
|
|
|
|
title={loc.settings.notifications}
|
2024-09-17 22:00:58 -04:00
|
|
|
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;
|