move window event listener to be registered sooner
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 31s
Details
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 31s
Details
This commit is contained in:
parent
1867aef9ec
commit
857500dc9f
|
@ -253,13 +253,6 @@ function Widget() {
|
|||
useEffect(() => {
|
||||
console.log('window.location', window.location);
|
||||
|
||||
window.addEventListener(
|
||||
'message',
|
||||
(event) => {
|
||||
if (event.data?.target?.startsWith('metamask')) return;
|
||||
console.log('window message', event);
|
||||
},
|
||||
);
|
||||
|
||||
window.widgetApiPromise.then((api) => {
|
||||
console.log('widgetApi promise resolved', api);
|
||||
|
|
|
@ -14,6 +14,14 @@ import Widget from './Widget';
|
|||
|
||||
window.widgetApiPromise = WidgetApiImpl.create({});
|
||||
|
||||
window.addEventListener(
|
||||
'message',
|
||||
(event) => {
|
||||
if (event.data?.target?.startsWith('metamask')) return;
|
||||
console.log('window message', event);
|
||||
},
|
||||
);
|
||||
|
||||
const router = createBrowserRouter([
|
||||
{
|
||||
path: '/',
|
||||
|
|
Loading…
Reference in New Issue