diff options
author | Sebastian <sebasjm@gmail.com> | 2023-06-02 14:26:28 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-06-02 14:26:28 -0300 |
commit | 1961f4744ca0db4666a2df4335c768ed86fc4e2f (patch) | |
tree | 26d3aa5d7a9d05c84eeb3176061de1a49cf4c5f1 /packages/taler-wallet-webextension/src/wallet/Application.tsx | |
parent | 9853f54201cc4c563b7f3b51564eeab54862a223 (diff) | |
download | wallet-core-1961f4744ca0db4666a2df4335c768ed86fc4e2f.tar.xz |
remove deprecated notifications, implement isOffline
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/Application.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/Application.tsx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Application.tsx b/packages/taler-wallet-webextension/src/wallet/Application.tsx index 31a71e249..13afccb6c 100644 --- a/packages/taler-wallet-webextension/src/wallet/Application.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Application.tsx @@ -44,6 +44,7 @@ import { LogoHeader } from "../components/LogoHeader.js"; import PendingTransactions from "../components/PendingTransactions.js"; import { LinkPrimary, + RedBanner, SubTitle, WalletAction, WalletBox, @@ -80,6 +81,7 @@ import { QrReaderPage } from "./QrReader.js"; import { SettingsPage } from "./Settings.js"; import { TransactionPage } from "./Transaction.js"; import { WelcomePage } from "./Welcome.js"; +import { useIsOnline } from "../hooks/useIsOnline.js"; export function Application(): VNode { const { i18n } = useTranslationContext(); @@ -585,8 +587,15 @@ function WalletTemplate({ children: ComponentChildren; goToTransaction?: (id: string) => Promise<void>; }): VNode { + const online = useIsOnline(); + const { i18n } = useTranslationContext(); return ( <Fragment> + {!online && ( + <div style={{ display: "flex", justifyContent: "center" }}> + <RedBanner>{i18n.str`Network is offline`}</RedBanner> + </div> + )} <LogoHeader /> <WalletNavBar path={path} /> {goToTransaction ? ( |