import classNames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; import Icon from 'soapbox/components/icon'; import { makeGetRemoteInstance } from 'soapbox/selectors'; import InstanceRestrictions from './instance_restrictions'; const getRemoteInstance = makeGetRemoteInstance(); const mapStateToProps = (state, ownProps) => { return { remoteInstance: getRemoteInstance(state, ownProps.host), }; }; export default @connect(mapStateToProps) class RestrictedInstance extends ImmutablePureComponent { static propTypes = { host: PropTypes.string.isRequired, } state = { expanded: false, } toggleExpanded = e => { this.setState({ expanded: !this.state.expanded }); e.preventDefault(); } render() { const { remoteInstance } = this.props; const { expanded } = this.state; return (
); } }