diff options
author | Renaud Chaput <renchap@gmail.com> | 2023-02-20 03:20:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 03:20:59 +0100 |
commit | 44a7d87cb1f5df953b6c14c16c59e2e4ead1bcb9 (patch) | |
tree | 71b60ccd9b23ec8f8d72fa3562f0bc343c6e456e /app/javascript/mastodon/features/report/rules.js | |
parent | f0e1b12c101e0dd0ddaaef8bdcc166624dba62d5 (diff) |
Rename JSX files with proper `.jsx` extension (#23733)
Diffstat (limited to 'app/javascript/mastodon/features/report/rules.js')
-rw-r--r-- | app/javascript/mastodon/features/report/rules.js | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/app/javascript/mastodon/features/report/rules.js b/app/javascript/mastodon/features/report/rules.js deleted file mode 100644 index 920da68d6..000000000 --- a/app/javascript/mastodon/features/report/rules.js +++ /dev/null @@ -1,64 +0,0 @@ -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 ( - <React.Fragment> - <h3 className='report-dialog-modal__title'><FormattedMessage id='report.rules.title' defaultMessage='Which rules are being violated?' /></h3> - <p className='report-dialog-modal__lead'><FormattedMessage id='report.rules.subtitle' defaultMessage='Select all that apply' /></p> - - <div> - {rules.map(item => ( - <Option - key={item.get('id')} - name='rule_ids' - value={item.get('id')} - checked={selectedRuleIds.includes(item.get('id'))} - onToggle={this.handleRulesToggle} - label={item.get('text')} - multiple - /> - ))} - </div> - - <div className='flex-spacer' /> - - <div className='report-dialog-modal__actions'> - <Button onClick={this.handleNextClick} disabled={selectedRuleIds.size < 1}><FormattedMessage id='report.next' defaultMessage='Next' /></Button> - </div> - </React.Fragment> - ); - } - -} |