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 => ({ closed_registrations_message: state.getIn(['server', 'server', 'registrations', 'closed_registrations_message']), }); export default @connect(mapStateToProps) class ClosedRegistrationsModal extends ImmutablePureComponent { componentDidMount () { const { dispatch } = this.props; dispatch(fetchServer()); } render () { let closedRegistrationsMessage; if (this.props.closed_registrations_message) { closedRegistrationsMessage = (
); } else { closedRegistrationsMessage = (