diff --git a/src/components/structures/EmbeddedPage.tsx b/src/components/structures/EmbeddedPage.tsx index 89c1582ee7..07c14475f2 100644 --- a/src/components/structures/EmbeddedPage.tsx +++ b/src/components/structures/EmbeddedPage.tsx @@ -25,6 +25,7 @@ import { MatrixClientPeg } from '../../MatrixClientPeg'; import classnames from 'classnames'; import MatrixClientContext from "../../contexts/MatrixClientContext"; import AutoHideScrollbar from "./AutoHideScrollbar"; +import { ActionPayload } from "../../dispatcher/payloads"; interface IProps { // URL to request embedded page content from @@ -44,13 +45,11 @@ interface IState { export default class EmbeddedPage extends React.PureComponent { public static contextType = MatrixClientContext; private unmounted = false; - private dispatcherRef: string; + private dispatcherRef: string = null; constructor(props: IProps, context: typeof MatrixClientContext) { super(props, context); - this.dispatcherRef = null; - this.state = { page: '', }; @@ -105,7 +104,7 @@ export default class EmbeddedPage extends React.PureComponent { if (this.dispatcherRef !== null) dis.unregister(this.dispatcherRef); } - private onAction = (payload): void => { + private onAction = (payload: ActionPayload): void => { // HACK: Workaround for the context's MatrixClient not being set up at render time. if (payload.action === 'client_started') { this.forceUpdate(); diff --git a/src/components/structures/GenericErrorPage.tsx b/src/components/structures/GenericErrorPage.tsx index e3b2133ae8..d124c7111a 100644 --- a/src/components/structures/GenericErrorPage.tsx +++ b/src/components/structures/GenericErrorPage.tsx @@ -18,8 +18,8 @@ import React from 'react'; import { replaceableComponent } from "../../utils/replaceableComponent"; interface IProps { - title: JSX.Element; - message: JSX.Element; + title: React.ReactNode; + message: React.ReactNode; } @replaceableComponent("structures.GenericErrorPage") diff --git a/src/components/structures/ViewSource.tsx b/src/components/structures/ViewSource.tsx index c0bcaadf7f..20bbece755 100644 --- a/src/components/structures/ViewSource.tsx +++ b/src/components/structures/ViewSource.tsx @@ -29,7 +29,6 @@ import { IDialogProps } from "../views/dialogs/IDialogProps"; import BaseDialog from "../views/dialogs/BaseDialog"; interface IProps extends IDialogProps { - onFinished: () => void; mxEvent: MatrixEvent; // the MatrixEvent associated with the context menu }