Use the new JSX transform (#25064)

This commit is contained in:
Renaud Chaput 2023-05-23 10:52:27 +02:00 committed by GitHub
parent e387175fc9
commit 8f66126b10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
241 changed files with 366 additions and 473 deletions

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent, Fragment } from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages, FormattedMessage } from 'react-intl';
import Button from 'mastodon/components/button';
@ -8,7 +8,7 @@ const messages = defineMessages({
placeholder: { id: 'report.placeholder', defaultMessage: 'Type or paste additional comments' },
});
class Comment extends React.PureComponent {
class Comment extends PureComponent {
static propTypes = {
onSubmit: PropTypes.func.isRequired,
@ -47,7 +47,7 @@ class Comment extends React.PureComponent {
const { comment, isRemote, forward, domain, isSubmitting, intl } = this.props;
return (
<React.Fragment>
<Fragment>
<h3 className='report-dialog-modal__title'><FormattedMessage id='report.comment.title' defaultMessage='Is there anything else you think we should know?' /></h3>
<textarea
@ -60,14 +60,14 @@ class Comment extends React.PureComponent {
/>
{isRemote && (
<React.Fragment>
<Fragment>
<p className='report-dialog-modal__lead'><FormattedMessage id='report.forward_hint' defaultMessage='The account is from another server. Send an anonymized copy of the report there as well?' /></p>
<label className='report-dialog-modal__toggle'>
<Toggle checked={forward} disabled={isSubmitting} onChange={this.handleForwardChange} />
<FormattedMessage id='report.forward' defaultMessage='Forward to {target}' values={{ target: domain }} />
</label>
</React.Fragment>
</Fragment>
)}
<div className='flex-spacer' />
@ -75,7 +75,7 @@ class Comment extends React.PureComponent {
<div className='report-dialog-modal__actions'>
<Button onClick={this.handleClick} disabled={isSubmitting}><FormattedMessage id='report.submit' defaultMessage='Submit report' /></Button>
</div>
</React.Fragment>
</Fragment>
);
}