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 {
|
||||
const page = document.location.hash || "#/";
|
||||
useEffect(() => {
|
||||
chrome.tabs
|
||||
.create({
|
||||
chrome.tabs.create(
|
||||
{
|
||||
active: true,
|
||||
// eslint-disable-next-line no-undef
|
||||
url: chrome.runtime.getURL(`/static/wallet.html${page}`),
|
||||
})
|
||||
.then(() => {
|
||||
},
|
||||
() => {
|
||||
window.close();
|
||||
});
|
||||
},
|
||||
);
|
||||
});
|
||||
return (
|
||||
<span>
|
||||
|
Loading…
Reference in New Issue
Block a user