Use the new JSX transform (#25064)
This commit is contained in:
parent
e387175fc9
commit
8f66126b10
241 changed files with 366 additions and 473 deletions
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import { PureComponent, Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Blurhash } from 'mastodon/components/blurhash';
|
||||
import { accountsCountRenderer } from 'mastodon/components/hashtag';
|
||||
|
@ -6,7 +6,7 @@ import ShortNumber from 'mastodon/components/short_number';
|
|||
import { Skeleton } from 'mastodon/components/skeleton';
|
||||
import classNames from 'classnames';
|
||||
|
||||
export default class Story extends React.PureComponent {
|
||||
export default class Story extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
url: PropTypes.string,
|
||||
|
@ -38,10 +38,10 @@ export default class Story extends React.PureComponent {
|
|||
|
||||
<div className='story__thumbnail'>
|
||||
{thumbnail ? (
|
||||
<React.Fragment>
|
||||
<Fragment>
|
||||
<div className={classNames('story__thumbnail__preview', { 'story__thumbnail__preview--hidden': thumbnailLoaded })}><Blurhash hash={blurhash} /></div>
|
||||
<img src={thumbnail} onLoad={this.handleImageLoad} alt='' role='presentation' />
|
||||
</React.Fragment>
|
||||
</Fragment>
|
||||
) : <Skeleton />}
|
||||
</div>
|
||||
</a>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import { PureComponent } from 'react';
|
||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||
import { connect } from 'react-redux';
|
||||
import PropTypes from 'prop-types';
|
||||
|
@ -24,7 +24,7 @@ const mapStateToProps = state => ({
|
|||
isSearching: state.getIn(['search', 'submitted']) || !showTrends,
|
||||
});
|
||||
|
||||
class Explore extends React.PureComponent {
|
||||
class Explore extends PureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
router: PropTypes.object,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import Story from './components/story';
|
||||
|
@ -13,7 +13,7 @@ const mapStateToProps = state => ({
|
|||
isLoading: state.getIn(['trends', 'links', 'isLoading']),
|
||||
});
|
||||
|
||||
class Links extends React.PureComponent {
|
||||
class Links extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
links: ImmutablePropTypes.list,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import { PureComponent, Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import { injectIntl, defineMessages, FormattedMessage } from 'react-intl';
|
||||
|
@ -42,7 +42,7 @@ const renderStatuses = (results, onLoadMore) => appendLoadMore('statuses', resul
|
|||
<Status key={`status-${item}`} id={item} />
|
||||
)), onLoadMore);
|
||||
|
||||
class Results extends React.PureComponent {
|
||||
class Results extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
results: ImmutablePropTypes.map,
|
||||
|
@ -102,7 +102,7 @@ class Results extends React.PureComponent {
|
|||
}
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Fragment>
|
||||
<div className='account__section-headline'>
|
||||
<button onClick={this.handleSelectAll} className={type === 'all' && 'active'}><FormattedMessage id='search_results.all' defaultMessage='All' /></button>
|
||||
<button onClick={this.handleSelectAccounts} className={type === 'accounts' && 'active'}><FormattedMessage id='search_results.accounts' defaultMessage='Profiles' /></button>
|
||||
|
@ -117,7 +117,7 @@ class Results extends React.PureComponent {
|
|||
<Helmet>
|
||||
<title>{intl.formatMessage(messages.title, { q })}</title>
|
||||
</Helmet>
|
||||
</React.Fragment>
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import StatusList from 'mastodon/components/status_list';
|
||||
|
@ -14,7 +14,7 @@ const mapStateToProps = state => ({
|
|||
hasMore: !!state.getIn(['status_lists', 'trending', 'next']),
|
||||
});
|
||||
|
||||
class Statuses extends React.PureComponent {
|
||||
class Statuses extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
statusIds: ImmutablePropTypes.list,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import AccountCard from 'mastodon/features/directory/components/account_card';
|
||||
|
@ -12,7 +12,7 @@ const mapStateToProps = state => ({
|
|||
isLoading: state.getIn(['suggestions', 'isLoading']),
|
||||
});
|
||||
|
||||
class Suggestions extends React.PureComponent {
|
||||
class Suggestions extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
isLoading: PropTypes.bool,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import { ImmutableHashtag as Hashtag } from 'mastodon/components/hashtag';
|
||||
|
@ -13,7 +13,7 @@ const mapStateToProps = state => ({
|
|||
isLoadingHashtags: state.getIn(['trends', 'tags', 'isLoading']),
|
||||
});
|
||||
|
||||
class Tags extends React.PureComponent {
|
||||
class Tags extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
hashtags: ImmutablePropTypes.list,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue