mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 01:35:49 +03:00
fix remaining type mismatches
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
4dd8b8d8c6
commit
b0acae6e77
3 changed files with 5 additions and 5 deletions
|
@ -23,7 +23,7 @@ import {useRovingTabIndex} from "../../accessibility/RovingTabIndex";
|
|||
import {Key} from "../../Keyboard";
|
||||
import {useLocalStorageState} from "../../hooks/useLocalStorageState";
|
||||
import MatrixClientContext from "../../contexts/MatrixClientContext";
|
||||
import WidgetUtils, {IWidget} from "../../utils/WidgetUtils";
|
||||
import WidgetUtils, {IWidgetEvent} from "../../utils/WidgetUtils";
|
||||
import {useAccountData} from "../../hooks/useAccountData";
|
||||
import AppTile from "../views/elements/AppTile";
|
||||
import {useSettingValue} from "../../hooks/useSettings";
|
||||
|
@ -39,7 +39,7 @@ const INITIAL_HEIGHT = 280;
|
|||
const LeftPanelWidget: React.FC<IProps> = ({ onResize }) => {
|
||||
const cli = useContext(MatrixClientContext);
|
||||
|
||||
const mWidgetsEvent = useAccountData<Record<string, IWidget>>(cli, "m.widgets");
|
||||
const mWidgetsEvent = useAccountData<Record<string, IWidgetEvent>>(cli, "m.widgets");
|
||||
const leftPanelWidgetId = useSettingValue("Widgets.leftPanel");
|
||||
const app = useMemo(() => {
|
||||
if (!mWidgetsEvent || !leftPanelWidgetId) return null;
|
||||
|
|
|
@ -120,7 +120,7 @@ export class IntegrationManagers {
|
|||
if (!data) return;
|
||||
|
||||
const uiUrl = w.content['url'];
|
||||
const apiUrl = data['api_url'];
|
||||
const apiUrl = data['api_url'] as string;
|
||||
if (!apiUrl || !uiUrl) return;
|
||||
|
||||
const manager = new IntegrationManagerInstance(
|
||||
|
|
|
@ -74,7 +74,7 @@ class ElementWidget extends Widget {
|
|||
if (WidgetType.JITSI.matches(this.type)) {
|
||||
return WidgetUtils.getLocalJitsiWrapperUrl({
|
||||
forLocalRender: true,
|
||||
auth: super.rawData?.auth, // this.rawData can call templateUrl, do this to prevent looping
|
||||
auth: super.rawData?.auth as string, // this.rawData can call templateUrl, do this to prevent looping
|
||||
});
|
||||
}
|
||||
return super.templateUrl;
|
||||
|
@ -84,7 +84,7 @@ class ElementWidget extends Widget {
|
|||
if (WidgetType.JITSI.matches(this.type)) {
|
||||
return WidgetUtils.getLocalJitsiWrapperUrl({
|
||||
forLocalRender: false, // The only important difference between this and templateUrl()
|
||||
auth: super.rawData?.auth,
|
||||
auth: super.rawData?.auth as string,
|
||||
});
|
||||
}
|
||||
return this.templateUrl; // use this instead of super to ensure we get appropriate templating
|
||||
|
|
Loading…
Reference in a new issue