try to instantiate widget api
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 35s Details

This commit is contained in:
Ladd Hoffman 2024-04-25 15:20:37 -05:00
parent 466be6dacd
commit b713c77f10
1 changed files with 6 additions and 1 deletions

View File

@ -10,7 +10,7 @@ import Container from 'react-bootstrap/Container';
import Row from 'react-bootstrap/Row';
import Col from 'react-bootstrap/Col';
import Stack from 'react-bootstrap/Stack';
import { EventDirection, WidgetEventCapability } from 'matrix-widget-api';
import { WidgetApi, EventDirection, WidgetEventCapability } from 'matrix-widget-api';
// import { MuiCapabilitiesGuard } from '@matrix-widget-toolkit/mui';
// import { useWidgetApi } from '@matrix-widget-toolkit/react';
@ -253,6 +253,11 @@ function Widget() {
useEffect(() => {
console.log('window.location', window.location);
widgetApi.current = new WidgetApi();
widgetApi.on('ready', (e) => {
console.log('WIDGET READY', e);
});
// window.widgetApiPromise.then((api) => {
// console.log('widgetApi promise resolved', api);
// widgetApi.current = api;