From f0fd4c64e470f20ed4acf2722fcad0e4f617c4e6 Mon Sep 17 00:00:00 2001 From: dominhquang Date: Wed, 16 Aug 2023 18:38:12 +0700 Subject: [PATCH] [Issue-199]: Add the lost internet connection screen --- src/components/Modal/PasswordModal.tsx | 8 ++---- src/components/NoInternetAlertBox.tsx | 19 +++++++++++++ src/hooks/balance/useGetBalance.ts | 9 +++++- src/screens/Home/index.tsx | 28 ++++++++++++++++--- src/screens/ImportNetwork.tsx | 7 ++++- src/screens/ImportToken/ImportToken.tsx | 11 +++++--- src/screens/NetworkSettingDetail.tsx | 9 +++++- src/screens/Tokens/ConfigureToken.tsx | 6 ++-- .../Transaction/CancelUnstake/index.tsx | 8 ++++-- src/screens/Transaction/ClaimReward/index.tsx | 7 ++++- src/screens/Transaction/NFT/index.tsx | 3 +- src/screens/Transaction/SendFundV2/index.tsx | 7 ++++- src/screens/Transaction/Stake/index.tsx | 7 ++++- src/screens/Transaction/Unbond/index.tsx | 7 ++++- src/screens/Transaction/Withdraw/index.tsx | 7 ++++- src/utils/i18n/en_US.ts | 2 ++ src/utils/i18n/vi_VN.ts | 2 ++ src/utils/i18n/zh_CN.ts | 2 ++ 18 files changed, 121 insertions(+), 28 deletions(-) create mode 100644 src/components/NoInternetAlertBox.tsx diff --git a/src/components/Modal/PasswordModal.tsx b/src/components/Modal/PasswordModal.tsx index 96a2a34b2..697da524d 100644 --- a/src/components/Modal/PasswordModal.tsx +++ b/src/components/Modal/PasswordModal.tsx @@ -4,11 +4,11 @@ import React, { useCallback, useContext, useEffect, useRef } from 'react'; import { StyleProp, View, ViewStyle } from 'react-native'; import { validatePassword } from 'screens/Shared/AccountNamePasswordCreation'; import i18n from 'utils/i18n/i18n'; -import { Warning } from 'components/Warning'; import { WebRunnerContext } from 'providers/contexts'; import { Button, SwModal } from 'components/design-system-ui'; import { SWModalRefProps } from 'components/design-system-ui/modal/ModalBaseV2'; import { ModalRefProps } from 'components/design-system-ui/modal/SwModal'; +import { NoInternetAlertBox } from 'components/NoInternetAlertBox'; interface Props { visible: boolean; @@ -114,12 +114,10 @@ const PasswordModal = ({ isBusy={isBusy} /> - {!isNetConnected && ( - - )} + {!isNetConnected && }