import { connect } from 'react-redux'; import { FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { domain } from 'mastodon/initial_state'; import { fetchServer } from 'mastodon/actions/server'; const mapStateToProps = state => ({ message: state.getIn(['server', 'server', 'registrations', 'message']), }); class ClosedRegistrationsModal extends ImmutablePureComponent { componentDidMount () { const { dispatch } = this.props; dispatch(fetchServer()); } render () { let closedRegistrationsMessage; if (this.props.message) { closedRegistrationsMessage = (
); } else { closedRegistrationsMessage = (