import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import { FormattedMessage } from 'react-intl'; import Button from 'mastodon/components/button'; import Option from './components/option'; const mapStateToProps = state => ({ rules: state.getIn(['server', 'server', 'rules']), }); export default @connect(mapStateToProps) class Rules extends React.PureComponent { static propTypes = { onNextStep: PropTypes.func.isRequired, rules: ImmutablePropTypes.list, selectedRuleIds: ImmutablePropTypes.set.isRequired, onToggle: PropTypes.func.isRequired, }; handleNextClick = () => { const { onNextStep } = this.props; onNextStep('statuses'); }; handleRulesToggle = (value, checked) => { const { onToggle } = this.props; onToggle(value, checked); }; render () { const { rules, selectedRuleIds } = this.props; return (

{rules.map(item => (
); } }