From b18691a1cba4a251ac7f6990ad7b76b8b507318c Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Sat, 3 Jul 2021 12:31:10 +0100 Subject: [PATCH] Migrate VerificationCancelled to TypeScript --- ...cationCancelled.js => VerificationCancelled.tsx} | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) rename src/components/views/verification/{VerificationCancelled.js => VerificationCancelled.tsx} (90%) diff --git a/src/components/views/verification/VerificationCancelled.js b/src/components/views/verification/VerificationCancelled.tsx similarity index 90% rename from src/components/views/verification/VerificationCancelled.js rename to src/components/views/verification/VerificationCancelled.tsx index 0d868edaaa..aa34b22382 100644 --- a/src/components/views/verification/VerificationCancelled.js +++ b/src/components/views/verification/VerificationCancelled.tsx @@ -15,18 +15,17 @@ limitations under the License. */ import React from 'react'; -import PropTypes from 'prop-types'; import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; import { replaceableComponent } from "../../../utils/replaceableComponent"; -@replaceableComponent("views.verification.VerificationCancelled") -export default class VerificationCancelled extends React.Component { - static propTypes = { - onDone: PropTypes.func.isRequired, - } +interface IProps { + onDone: () => void; +} - render() { +@replaceableComponent("views.verification.VerificationCancelled") +export default class VerificationCancelled extends React.Component { + public render(): React.ReactNode { const DialogButtons = sdk.getComponent('views.elements.DialogButtons'); return

{_t(