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
241 changed files with 366 additions and 473 deletions

View File

@ -1,5 +1,3 @@
import React from 'react';
const ArrowSmallRight = () => (
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'>
<path fillRule='evenodd' d='M5 10a.75.75 0 01.75-.75h6.638L10.23 7.29a.75.75 0 111.04-1.08l3.5 3.25a.75.75 0 010 1.08l-3.5 3.25a.75.75 0 11-1.04-1.08l2.158-1.96H5.75A.75.75 0 015 10z' clipRule='evenodd' />

View File

@ -1,4 +1,4 @@
import React from 'react';
import { Fragment } from 'react';
import PropTypes from 'prop-types';
import { Check } from 'mastodon/components/check';
import classNames from 'classnames';
@ -6,13 +6,13 @@ import classNames from 'classnames';
const ProgressIndicator = ({ steps, completed }) => (
<div className='onboarding__progress-indicator'>
{(new Array(steps)).fill().map((_, i) => (
<React.Fragment key={i}>
<Fragment key={i}>
{i > 0 && <div className={classNames('onboarding__progress-indicator__line', { active: completed > i })} />}
<div className={classNames('onboarding__progress-indicator__step', { active: completed > i })}>
{completed > i && <Check />}
</div>
</React.Fragment>
</Fragment>
))}
</div>
);

View File

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Icon } from 'mastodon/components/icon';
import { Check } from 'mastodon/components/check';

View File

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import Column from 'mastodon/components/column';
import ColumnBackButton from 'mastodon/components/column_back_button';
import PropTypes from 'prop-types';
@ -23,7 +23,7 @@ const mapStateToProps = () => {
});
};
class Follows extends React.PureComponent {
class Follows extends PureComponent {
static propTypes = {
onBack: PropTypes.func,

View File

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';

View File

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import Column from 'mastodon/components/column';
import ColumnBackButton from 'mastodon/components/column_back_button';
import PropTypes from 'prop-types';
@ -20,7 +20,7 @@ const mapStateToProps = state => ({
account: state.getIn(['accounts', me]),
});
class CopyPasteText extends React.PureComponent {
class CopyPasteText extends PureComponent {
static propTypes = {
value: PropTypes.string,
@ -81,7 +81,7 @@ class CopyPasteText extends React.PureComponent {
}
class TipCarousel extends React.PureComponent {
class TipCarousel extends PureComponent {
static propTypes = {
children: PropTypes.node,
@ -135,7 +135,7 @@ class TipCarousel extends React.PureComponent {
}
class Share extends React.PureComponent {
class Share extends PureComponent {
static propTypes = {
onBack: PropTypes.func,