/* eslint-disable no-negated-condition */ import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import Identicon from '../../../../ui/identicon'; const ConfirmPageContainerSummary = (props) => { const { action, title, titleComponent, subtitleComponent, hideSubtitle, className, identiconAddress, nonce, origin, hideTitle, } = props; return (
{origin === 'metamask' ? null : (
{origin}
)}
{action}
{nonce && (
{`#${nonce}`}
)}
{identiconAddress && ( )} {!hideTitle ? (
{titleComponent || title}
) : null}
{hideSubtitle || (
{subtitleComponent}
)}
); }; ConfirmPageContainerSummary.propTypes = { action: PropTypes.string, title: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), titleComponent: PropTypes.node, subtitleComponent: PropTypes.node, hideSubtitle: PropTypes.bool, className: PropTypes.string, identiconAddress: PropTypes.string, nonce: PropTypes.string, origin: PropTypes.string.isRequired, hideTitle: PropTypes.boolean, }; export default ConfirmPageContainerSummary;