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