From 9e74477771a5b50de721f9c5a57021c6d6097370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sun, 5 Sep 2021 16:11:10 +0200 Subject: [PATCH] Convert IntegrationsImpossibleDialog to TS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- ...log.js => IntegrationsImpossibleDialog.tsx} | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename src/components/views/dialogs/{IntegrationsImpossibleDialog.js => IntegrationsImpossibleDialog.tsx} (89%) diff --git a/src/components/views/dialogs/IntegrationsImpossibleDialog.js b/src/components/views/dialogs/IntegrationsImpossibleDialog.tsx similarity index 89% rename from src/components/views/dialogs/IntegrationsImpossibleDialog.js rename to src/components/views/dialogs/IntegrationsImpossibleDialog.tsx index 6cfb96a1b4..36dc42b783 100644 --- a/src/components/views/dialogs/IntegrationsImpossibleDialog.js +++ b/src/components/views/dialogs/IntegrationsImpossibleDialog.tsx @@ -15,23 +15,23 @@ limitations under the License. */ import React from 'react'; -import PropTypes from 'prop-types'; import { _t } from "../../../languageHandler"; import SdkConfig from "../../../SdkConfig"; import * as sdk from "../../../index"; import { replaceableComponent } from "../../../utils/replaceableComponent"; -@replaceableComponent("views.dialogs.IntegrationsImpossibleDialog") -export default class IntegrationsImpossibleDialog extends React.Component { - static propTypes = { - onFinished: PropTypes.func.isRequired, - }; +interface IProps { + onFinished: () => void; - _onAcknowledgeClick = () => { +} + +@replaceableComponent("views.dialogs.IntegrationsImpossibleDialog") +export default class IntegrationsImpossibleDialog extends React.Component { + private onAcknowledgeClick = (): void => { this.props.onFinished(); }; - render() { + public render(): JSX.Element { const brand = SdkConfig.get().brand; const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog'); const DialogButtons = sdk.getComponent('views.elements.DialogButtons'); @@ -54,7 +54,7 @@ export default class IntegrationsImpossibleDialog extends React.Component {