import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; export default class SignatureRequestMessage extends PureComponent { static propTypes = { data: PropTypes.object.isRequired, }; static contextTypes = { t: PropTypes.func, }; renderNode(data) { return (
{Object.entries(data).map(([label, value], i) => (
{label}:{' '} {typeof value === 'object' && value !== null ? ( this.renderNode(value) ) : ( {`${value}`} )}
))}
); } render() { const { data } = this.props; return (
{this.context.t('signatureRequest1')}
{this.renderNode(data)}
); } }