import React from 'react'; import { connect } from 'react-redux'; import Warning from '../components/warning'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { me } from '../../../initial_state'; const mapStateToProps = state => ({ needsLockWarning: state.getIn(['compose', 'privacy']) === 'private' && !state.getIn(['accounts', me, 'locked']), }); const WarningWrapper = ({ needsLockWarning }) => { if (needsLockWarning) { return }} />} />; } return null; }; WarningWrapper.propTypes = { needsLockWarning: PropTypes.bool, }; export default connect(mapStateToProps)(WarningWrapper);