const injectIntl = require('react-intl').injectIntl; const PropTypes = require('prop-types'); const React = require('react'); const FormattedMessage = require('react-intl').FormattedMessage; // Allow embedding html in banner messages coming from the server const embedCensorMessage = message => ( // eslint-disable-next-line react/no-danger ); const communityGuidelinesLink = ( ); const CensoredMessage = ({censoredByCommunity, messageHTML, reshareable}) => ( {/* if message HTML is provided, set innerHTML with it */} {messageHTML ? embedCensorMessage(messageHTML) : (censoredByCommunity ? (

) : ( // if message is blank or missing, use default

{reshareable ? ( ) : ( )}
)) }
); CensoredMessage.propTypes = { censoredByCommunity: PropTypes.bool, messageHTML: PropTypes.string, reshareable: PropTypes.bool }; module.exports = injectIntl(CensoredMessage);