webextension: close popup
only seems to work with callbacks, not with promises
This commit is contained in:
parent
ced02d1fed
commit
7a27da5fba
@ -172,15 +172,16 @@ function Application(): VNode {
|
|||||||
function RedirectToWalletPage(): VNode {
|
function RedirectToWalletPage(): VNode {
|
||||||
const page = document.location.hash || "#/";
|
const page = document.location.hash || "#/";
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
chrome.tabs
|
chrome.tabs.create(
|
||||||
.create({
|
{
|
||||||
active: true,
|
active: true,
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
url: chrome.runtime.getURL(`/static/wallet.html${page}`),
|
url: chrome.runtime.getURL(`/static/wallet.html${page}`),
|
||||||
})
|
},
|
||||||
.then(() => {
|
() => {
|
||||||
window.close();
|
window.close();
|
||||||
});
|
},
|
||||||
|
);
|
||||||
});
|
});
|
||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
|
Loading…
Reference in New Issue
Block a user