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 { 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>