diff options
author | Sebastian <sebasjm@gmail.com> | 2022-03-21 09:57:36 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-03-21 09:57:36 -0300 |
commit | c202abef5e1281b73b78fe3c1830a89fb8b68e1d (patch) | |
tree | b85631607eb9f662fab2618e5e6a4b20143afec1 /packages/taler-wallet-webextension | |
parent | 88bb94367263494a1ff9b8bf66100b96e0549985 (diff) |
redirect message delay
Diffstat (limited to 'packages/taler-wallet-webextension')
-rw-r--r-- | packages/taler-wallet-webextension/src/popupEntryPoint.tsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/taler-wallet-webextension/src/popupEntryPoint.tsx b/packages/taler-wallet-webextension/src/popupEntryPoint.tsx index e78bc4ff9..7ee6c8e4b 100644 --- a/packages/taler-wallet-webextension/src/popupEntryPoint.tsx +++ b/packages/taler-wallet-webextension/src/popupEntryPoint.tsx @@ -25,7 +25,7 @@ import { createHashHistory } from "history"; import { Fragment, h, render, VNode } from "preact"; import Router, { route, Route } from "preact-router"; import { Match } from "preact-router/match"; -import { useEffect } from "preact/hooks"; +import { useEffect, useState } from "preact/hooks"; import PendingTransactions from "./components/PendingTransactions"; import { PopupBox } from "./components/styled"; import { DevContextProvider } from "./context/devContext"; @@ -181,6 +181,7 @@ function Application(): VNode { function RedirectToWalletPage(): VNode { const page = document.location.hash || "#/"; + const [showText, setShowText] = useState(false); useEffect(() => { chrome.tabs.create( { @@ -192,8 +193,12 @@ function RedirectToWalletPage(): VNode { window.close(); }, ); + setTimeout(() => { + setShowText(true); + }, 250); }); const { i18n } = useTranslationContext(); + if (!showText) return <Fragment />; return ( <span> <i18n.Translate> |