Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit b0acae6

Browse files
committed
fix remaining type mismatches
Signed-off-by: Michael Telatynski <[email protected]>
1 parent 4dd8b8d commit b0acae6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/components/structures/LeftPanelWidget.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {useRovingTabIndex} from "../../accessibility/RovingTabIndex";
2323
import {Key} from "../../Keyboard";
2424
import {useLocalStorageState} from "../../hooks/useLocalStorageState";
2525
import MatrixClientContext from "../../contexts/MatrixClientContext";
26-
import WidgetUtils, {IWidget} from "../../utils/WidgetUtils";
26+
import WidgetUtils, {IWidgetEvent} from "../../utils/WidgetUtils";
2727
import {useAccountData} from "../../hooks/useAccountData";
2828
import AppTile from "../views/elements/AppTile";
2929
import {useSettingValue} from "../../hooks/useSettings";
@@ -39,7 +39,7 @@ const INITIAL_HEIGHT = 280;
3939
const LeftPanelWidget: React.FC<IProps> = ({ onResize }) => {
4040
const cli = useContext(MatrixClientContext);
4141

42-
const mWidgetsEvent = useAccountData<Record<string, IWidget>>(cli, "m.widgets");
42+
const mWidgetsEvent = useAccountData<Record<string, IWidgetEvent>>(cli, "m.widgets");
4343
const leftPanelWidgetId = useSettingValue("Widgets.leftPanel");
4444
const app = useMemo(() => {
4545
if (!mWidgetsEvent || !leftPanelWidgetId) return null;

src/integrations/IntegrationManagers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class IntegrationManagers {
120120
if (!data) return;
121121

122122
const uiUrl = w.content['url'];
123-
const apiUrl = data['api_url'];
123+
const apiUrl = data['api_url'] as string;
124124
if (!apiUrl || !uiUrl) return;
125125

126126
const manager = new IntegrationManagerInstance(

src/stores/widgets/StopGapWidget.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class ElementWidget extends Widget {
7474
if (WidgetType.JITSI.matches(this.type)) {
7575
return WidgetUtils.getLocalJitsiWrapperUrl({
7676
forLocalRender: true,
77-
auth: super.rawData?.auth, // this.rawData can call templateUrl, do this to prevent looping
77+
auth: super.rawData?.auth as string, // this.rawData can call templateUrl, do this to prevent looping
7878
});
7979
}
8080
return super.templateUrl;
@@ -84,7 +84,7 @@ class ElementWidget extends Widget {
8484
if (WidgetType.JITSI.matches(this.type)) {
8585
return WidgetUtils.getLocalJitsiWrapperUrl({
8686
forLocalRender: false, // The only important difference between this and templateUrl()
87-
auth: super.rawData?.auth,
87+
auth: super.rawData?.auth as string,
8888
});
8989
}
9090
return this.templateUrl; // use this instead of super to ensure we get appropriate templating

0 commit comments

Comments
 (0)