Convert VerificationQRCode to TS

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-09-15 19:54:43 +02:00
parent 05971e0492
commit 88cadd52a8
No known key found for this signature in database
GPG Key ID: 55C211A1226CB17D
1 changed files with 8 additions and 8 deletions

View File

@ -15,20 +15,20 @@ limitations under the License.
*/
import React from "react";
import PropTypes from "prop-types";
import { replaceableComponent } from "../../../../utils/replaceableComponent";
import QRCode from "../QRCode";
import { QRCodeData } from "matrix-js-sdk/src/crypto/verification/QRCode";
interface IProps {
qrCodeData: QRCodeData;
}
@replaceableComponent("views.elements.crypto.VerificationQRCode")
export default class VerificationQRCode extends React.PureComponent {
static propTypes = {
qrCodeData: PropTypes.object.isRequired,
};
render() {
export default class VerificationQRCode extends React.PureComponent<IProps> {
public render(): JSX.Element {
return (
<QRCode
data={[{ data: this.props.qrCodeData.buffer, mode: 'byte' }]}
data={[{ data: this.props.qrCodeData.getBuffer(), mode: 'byte' }]}
className="mx_VerificationQRCode"
width={196} />
);