import { PureComponent } from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { FormattedMessage } from 'react-intl'; import Button from 'mastodon/components/button'; import { connect } from 'react-redux'; import { unfollowAccount, muteAccount, blockAccount, } from 'mastodon/actions/accounts'; const mapStateToProps = () => ({}); class Thanks extends PureComponent { static propTypes = { submitted: PropTypes.bool, onClose: PropTypes.func.isRequired, account: ImmutablePropTypes.map.isRequired, dispatch: PropTypes.func.isRequired, }; handleCloseClick = () => { const { onClose } = this.props; onClose(); }; handleUnfollowClick = () => { const { dispatch, account, onClose } = this.props; dispatch(unfollowAccount(account.get('id'))); onClose(); }; handleMuteClick = () => { const { dispatch, account, onClose } = this.props; dispatch(muteAccount(account.get('id'))); onClose(); }; handleBlockClick = () => { const { dispatch, account, onClose } = this.props; dispatch(blockAccount(account.get('id'))); onClose(); }; render () { const { account, submitted } = this.props; return ( <>

{submitted ? : }

{submitted ? : }

{account.getIn(['relationship', 'following']) && ( <>


)}


); } } export default connect(mapStateToProps)(Thanks);