From f8e3aa33162e253ce5b3b840b387d77ff8138705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sun, 5 Sep 2021 16:09:33 +0200 Subject: [PATCH] Convert IntegrationsDisabledDialog to TS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- ...alog.js => IntegrationsDisabledDialog.tsx} | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) rename src/components/views/dialogs/{IntegrationsDisabledDialog.js => IntegrationsDisabledDialog.tsx} (76%) diff --git a/src/components/views/dialogs/IntegrationsDisabledDialog.js b/src/components/views/dialogs/IntegrationsDisabledDialog.tsx similarity index 76% rename from src/components/views/dialogs/IntegrationsDisabledDialog.js rename to src/components/views/dialogs/IntegrationsDisabledDialog.tsx index 6a5b2f08f9..f76ed46577 100644 --- a/src/components/views/dialogs/IntegrationsDisabledDialog.js +++ b/src/components/views/dialogs/IntegrationsDisabledDialog.tsx @@ -15,32 +15,29 @@ limitations under the License. */ import React from 'react'; -import PropTypes from 'prop-types'; import { _t } from "../../../languageHandler"; -import * as sdk from "../../../index"; import dis from '../../../dispatcher/dispatcher'; import { Action } from "../../../dispatcher/actions"; import { replaceableComponent } from "../../../utils/replaceableComponent"; +import BaseDialog from "./BaseDialog"; +import DialogButtons from "../elements/DialogButtons"; + +interface IProps { + onFinished: () => void; +} @replaceableComponent("views.dialogs.IntegrationsDisabledDialog") -export default class IntegrationsDisabledDialog extends React.Component { - static propTypes = { - onFinished: PropTypes.func.isRequired, - }; - - _onAcknowledgeClick = () => { +export default class IntegrationsDisabledDialog extends React.Component { + private onAcknowledgeClick = (): void => { this.props.onFinished(); }; - _onOpenSettingsClick = () => { + private onOpenSettingsClick = (): void => { this.props.onFinished(); dis.fire(Action.ViewUserSettings); }; - render() { - const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog'); - const DialogButtons = sdk.getComponent('views.elements.DialogButtons'); - + public render(): JSX.Element { return ( );