From 7202b830efc098441e5ddd960babadc11cd570a9 Mon Sep 17 00:00:00 2001 From: Alex Ruzenhack Date: Wed, 25 Oct 2023 23:01:44 +0100 Subject: [PATCH] (6) feat: add network settings flow stack (#346) * feat: add NetworkSettingsFlowStack * chore: add copyright comment * fix: typo on NetworkSettingsDisclaimer * lint: resolve lint issues --- src/App.js | 2 ++ .../NetworkSettings/NetworkSettingsFlowStack.js | 15 +++++++++++++++ src/screens/NetworkSettings/index.js | 13 +++++++++++++ src/screens/Settings.js | 8 ++++++++ 4 files changed, 38 insertions(+) create mode 100644 src/screens/NetworkSettings/NetworkSettingsFlowStack.js create mode 100644 src/screens/NetworkSettings/index.js diff --git a/src/App.js b/src/App.js index 39e673f97..be1e5090b 100644 --- a/src/App.js +++ b/src/App.js @@ -84,6 +84,7 @@ import WalletConnectScan from './screens/WalletConnect/WalletConnectScan'; import baseStyle from './styles/init'; import WalletConnectModal from './components/WalletConnect/WalletConnectModal'; import { COLORS, HathorTheme } from './styles/themes'; +import { NetworkSettingsFlowNav, NetworkSettingsFlowStack } from './screens/NetworkSettings'; /** * This Stack Navigator is exhibited when there is no wallet initialized on the local storage. @@ -389,6 +390,7 @@ const AppStack = () => { + { + const FlowStack = createStackNavigator(); + return ( + + ); +}; diff --git a/src/screens/NetworkSettings/index.js b/src/screens/NetworkSettings/index.js new file mode 100644 index 000000000..53d33d575 --- /dev/null +++ b/src/screens/NetworkSettings/index.js @@ -0,0 +1,13 @@ +/** + * Copyright (c) Hathor Labs and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import { NetworkSettingsFlowStack, NetworkSettingsFlowNav } from './NetworkSettingsFlowStack'; + +export { + NetworkSettingsFlowStack, + NetworkSettingsFlowNav +}; diff --git a/src/screens/Settings.js b/src/screens/Settings.js index 09dae4ec9..3c85c6a6d 100644 --- a/src/screens/Settings.js +++ b/src/screens/Settings.js @@ -23,6 +23,7 @@ import { } from '../constants'; import CopyClipboard from '../components/CopyClipboard'; import { COLORS } from '../styles/themes'; +import { NetworkSettingsFlowNav } from './NetworkSettings'; /** * selectedToken {Object} Select token config {name, symbol, uid} @@ -170,6 +171,13 @@ export class Settings extends React.Component { /> + + this.props.navigation.navigate(NetworkSettingsFlowNav)} + /> + +