1
0
Fork 0
forked from fedi/mastodon

Compare commits

...

1 commit
ETR ... react18

Author SHA1 Message Date
Yamagishi Kazutoshi 83b21e90d2 Bump React from 16.14.0 to 18.1.0 2022-06-28 10:42:50 +00:00
226 changed files with 531 additions and 610 deletions

View file

@ -1,4 +1,3 @@
import React from 'react';
import renderer from 'react-test-renderer';
import AutosuggestEmoji from '../autosuggest_emoji';

View file

@ -1,4 +1,3 @@
import React from 'react';
import renderer from 'react-test-renderer';
import { fromJS } from 'immutable';
import Avatar from '../avatar';

View file

@ -1,4 +1,3 @@
import React from 'react';
import renderer from 'react-test-renderer';
import { fromJS } from 'immutable';
import AvatarOverlay from '../avatar_overlay';

View file

@ -1,5 +1,4 @@
import { render, fireEvent, screen } from '@testing-library/react';
import React from 'react';
import renderer from 'react-test-renderer';
import Button from '../button';

View file

@ -1,4 +1,3 @@
import React from 'react';
import renderer from 'react-test-renderer';
import { fromJS } from 'immutable';
import DisplayName from '../display_name';

View file

@ -1,4 +1,3 @@
import React, { Fragment } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Avatar from './avatar';
@ -72,10 +71,10 @@ class Account extends ImmutablePureComponent {
if (hidden) {
return (
<Fragment>
<>
{account.get('display_name')}
{account.get('username')}
</Fragment>
</>
);
}
@ -103,10 +102,10 @@ class Account extends ImmutablePureComponent {
hidingNotificationsButton = <IconButton active icon='bell-slash' title={intl.formatMessage(messages.mute_notifications, { name: account.get('username') })} onClick={this.handleMuteNotifications} />;
}
buttons = (
<Fragment>
<>
<IconButton active icon='volume-up' title={intl.formatMessage(messages.unmute, { name: account.get('username') })} onClick={this.handleMute} />
{hidingNotificationsButton}
</Fragment>
</>
);
} else if (defaultAction === 'mute') {
buttons = <IconButton icon='volume-off' title={intl.formatMessage(messages.mute, { name: account.get('username') })} onClick={this.handleMute} />;

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import api from 'mastodon/api';
import { FormattedNumber } from 'react-intl';
@ -24,7 +24,7 @@ const percIncrease = (a, b) => {
return percent;
};
export default class Counter extends React.PureComponent {
export default class Counter extends PureComponent {
static propTypes = {
measure: PropTypes.string.isRequired,
@ -62,25 +62,25 @@ export default class Counter extends React.PureComponent {
if (loading) {
content = (
<React.Fragment>
<>
<span className='sparkline__value__total'><Skeleton width={43} /></span>
<span className='sparkline__value__change'><Skeleton width={43} /></span>
</React.Fragment>
</>
);
} else {
const measure = data[0];
const percentChange = measure.previous_total && percIncrease(measure.previous_total * 1, measure.total * 1);
content = (
<React.Fragment>
<>
<span className='sparkline__value__total'>{measure.human_value || <FormattedNumber value={measure.total} />}</span>
{measure.previous_total && (<span className={classNames('sparkline__value__change', { positive: percentChange > 0, negative: percentChange < 0 })}>{percentChange > 0 && '+'}<FormattedNumber value={percentChange} style='percent' /></span>)}
</React.Fragment>
</>
);
}
const inner = (
<React.Fragment>
<>
<div className='sparkline__value'>
{content}
</div>
@ -96,7 +96,7 @@ export default class Counter extends React.PureComponent {
</Sparklines>
)}
</div>
</React.Fragment>
</>
);
if (href) {

View file

@ -1,11 +1,11 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import api from 'mastodon/api';
import { FormattedNumber } from 'react-intl';
import { roundTo10 } from 'mastodon/utils/numbers';
import Skeleton from 'mastodon/components/skeleton';
export default class Dimension extends React.PureComponent {
export default class Dimension extends PureComponent {
static propTypes = {
dimension: PropTypes.string.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import api from 'mastodon/api';
import { injectIntl, defineMessages } from 'react-intl';
@ -10,7 +10,7 @@ const messages = defineMessages({
violation: { id: 'report.categories.violation', defaultMessage: 'Content violates one or more server rules' },
});
class Category extends React.PureComponent {
class Category extends PureComponent {
static propTypes = {
id: PropTypes.string.isRequired,
@ -52,7 +52,7 @@ class Category extends React.PureComponent {
}
class Rule extends React.PureComponent {
class Rule extends PureComponent {
static propTypes = {
id: PropTypes.string.isRequired,
@ -85,7 +85,7 @@ class Rule extends React.PureComponent {
}
export default @injectIntl
class ReportReasonSelector extends React.PureComponent {
class ReportReasonSelector extends PureComponent {
static propTypes = {
id: PropTypes.string.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import api from 'mastodon/api';
import { FormattedMessage, FormattedNumber, FormattedDate } from 'react-intl';
@ -14,7 +14,7 @@ const dateForCohort = cohort => {
}
};
export default class Retention extends React.PureComponent {
export default class Retention extends PureComponent {
static propTypes = {
start_at: PropTypes.string,

View file

@ -1,11 +1,11 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import api from 'mastodon/api';
import { FormattedMessage } from 'react-intl';
import classNames from 'classnames';
import Hashtag from 'mastodon/components/hashtag';
export default class Trends extends React.PureComponent {
export default class Trends extends PureComponent {
static propTypes = {
limit: PropTypes.number.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { FormattedNumber } from 'react-intl';
import TransitionMotion from 'react-motion/lib/TransitionMotion';
@ -15,7 +15,7 @@ const obfuscatedCount = count => {
}
};
export default class AnimatedNumber extends React.PureComponent {
export default class AnimatedNumber extends PureComponent {
static propTypes = {
value: PropTypes.number.isRequired,
@ -26,7 +26,7 @@ export default class AnimatedNumber extends React.PureComponent {
direction: 1,
};
componentWillReceiveProps (nextProps) {
UNSAFE_componentWillReceiveProps (nextProps) {
if (nextProps.value > this.props.value) {
this.setState({ direction: 1 });
} else if (nextProps.value < this.props.value) {

View file

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

View file

@ -1,9 +1,9 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import unicodeMapping from '../features/emoji/emoji_unicode_mapping_light';
import { assetHost } from 'mastodon/utils/config';
export default class AutosuggestEmoji extends React.PureComponent {
export default class AutosuggestEmoji extends PureComponent {
static propTypes = {
emoji: PropTypes.object.isRequired,

View file

@ -1,9 +1,9 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ShortNumber from 'mastodon/components/short_number';
import { FormattedMessage } from 'react-intl';
export default class AutosuggestHashtag extends React.PureComponent {
export default class AutosuggestHashtag extends PureComponent {
static propTypes = {
tag: PropTypes.shape({

View file

@ -1,4 +1,3 @@
import React from 'react';
import AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container';
import AutosuggestEmoji from './autosuggest_emoji';
import AutosuggestHashtag from './autosuggest_hashtag';
@ -152,7 +151,7 @@ export default class AutosuggestInput extends ImmutablePureComponent {
this.input.focus();
}
componentWillReceiveProps (nextProps) {
UNSAFE_componentWillReceiveProps (nextProps) {
if (nextProps.suggestions !== this.props.suggestions && nextProps.suggestions.size > 0 && this.state.suggestionsHidden && this.state.focused) {
this.setState({ suggestionsHidden: false });
}

View file

@ -1,4 +1,3 @@
import React from 'react';
import AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container';
import AutosuggestEmoji from './autosuggest_emoji';
import AutosuggestHashtag from './autosuggest_hashtag';
@ -152,7 +151,7 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
this.textarea.focus();
}
componentWillReceiveProps (nextProps) {
UNSAFE_componentWillReceiveProps (nextProps) {
if (nextProps.suggestions !== this.props.suggestions && nextProps.suggestions.size > 0 && this.state.suggestionsHidden && this.state.focused) {
this.setState({ suggestionsHidden: false });
}

View file

@ -1,10 +1,10 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { autoPlayGif } from '../initial_state';
import classNames from 'classnames';
export default class Avatar extends React.PureComponent {
export default class Avatar extends PureComponent {
static propTypes = {
account: ImmutablePropTypes.map,

View file

@ -1,9 +1,9 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { autoPlayGif } from '../initial_state';
export default class AvatarComposite extends React.PureComponent {
export default class AvatarComposite extends PureComponent {
static propTypes = {
accounts: ImmutablePropTypes.list.isRequired,

View file

@ -1,9 +1,9 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { autoPlayGif } from '../initial_state';
export default class AvatarOverlay extends React.PureComponent {
export default class AvatarOverlay extends PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,

View file

@ -1,7 +1,7 @@
// @ts-check
import { decode } from 'blurhash';
import React, { useRef, useEffect } from 'react';
import { memo, useRef, useEffect } from 'react';
import PropTypes from 'prop-types';
/**
@ -62,4 +62,4 @@ Blurhash.propTypes = {
dummy: PropTypes.bool,
};
export default React.memo(Blurhash);
export default memo(Blurhash);

View file

@ -1,8 +1,8 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
export default class Button extends React.PureComponent {
export default class Button extends PureComponent {
static propTypes = {
text: PropTypes.node,

View file

@ -1,5 +1,3 @@
import React from 'react';
const Check = () => (
<svg width='14' height='11' viewBox='0 0 14 11'>
<path d='M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0' fill='currentColor' fillRule='evenodd' />

View file

@ -1,9 +1,9 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { supportsPassiveEvents } from 'detect-passive-events';
import { scrollTop } from '../scroll';
export default class Column extends React.PureComponent {
export default class Column extends PureComponent {
static propTypes = {
children: PropTypes.node,

View file

@ -1,10 +1,10 @@
import React from 'react';
import { PureComponent } from 'react';
import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
import Icon from 'mastodon/components/icon';
import { createPortal } from 'react-dom';
export default class ColumnBackButton extends React.PureComponent {
export default class ColumnBackButton extends PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -1,4 +1,3 @@
import React from 'react';
import { FormattedMessage } from 'react-intl';
import ColumnBackButton from './column_back_button';
import Icon from 'mastodon/components/icon';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { createPortal } from 'react-dom';
import classNames from 'classnames';
@ -13,7 +13,7 @@ const messages = defineMessages({
});
export default @injectIntl
class ColumnHeader extends React.PureComponent {
class ColumnHeader extends PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -1,5 +1,4 @@
// @ts-check
import React from 'react';
import { FormattedMessage } from 'react-intl';
/**

View file

@ -1,9 +1,9 @@
import React from 'react';
import { PureComponent } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { autoPlayGif } from 'mastodon/initial_state';
export default class DisplayName extends React.PureComponent {
export default class DisplayName extends PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import IconButton from './icon_button';
import { defineMessages, injectIntl } from 'react-intl';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { Children, PureComponent, cloneElement } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import IconButton from './icon_button';
@ -12,7 +12,7 @@ import { CircularProgress } from 'mastodon/components/loading_indicator';
const listenerOptions = supportsPassiveEvents ? { passive: true } : false;
let id = 0;
class DropdownMenu extends React.PureComponent {
class DropdownMenu extends PureComponent {
static contextTypes = {
router: PropTypes.object,
@ -178,7 +178,7 @@ class DropdownMenu extends React.PureComponent {
}
export default class Dropdown extends React.PureComponent {
export default class Dropdown extends PureComponent {
static contextTypes = {
router: PropTypes.object,
@ -313,7 +313,7 @@ export default class Dropdown extends React.PureComponent {
const open = this.state.id === openDropdownId;
const button = children ? React.cloneElement(React.Children.only(children), {
const button = children ? cloneElement(Children.only(children), {
ref: this.setTargetRef,
onClick: this.handleClick,
onMouseDown: this.handleMouseDown,
@ -335,7 +335,7 @@ export default class Dropdown extends React.PureComponent {
);
return (
<React.Fragment>
<>
{button}
<Overlay show={open} placement={dropdownPlacement} target={this.findTarget}>
@ -350,7 +350,7 @@ export default class Dropdown extends React.PureComponent {
onItemClick={this.handleItemClick}
/>
</Overlay>
</React.Fragment>
</>
);
}

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage, injectIntl } from 'react-intl';
import Icon from 'mastodon/components/icon';
@ -18,7 +18,7 @@ const mapDispatchToProps = (dispatch, { statusId }) => ({
export default @connect(null, mapDispatchToProps)
@injectIntl
class EditedTimestamp extends React.PureComponent {
class EditedTimestamp extends PureComponent {
static propTypes = {
statusId: PropTypes.string.isRequired,

View file

@ -1,10 +1,10 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { version, source_url } from 'mastodon/initial_state';
import StackTrace from 'stacktrace-js';
export default class ErrorBoundary extends React.PureComponent {
export default class ErrorBoundary extends PureComponent {
static propTypes = {
children: PropTypes.node,

View file

@ -1,7 +1,7 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
export default class GIFV extends React.PureComponent {
export default class GIFV extends PureComponent {
static propTypes = {
src: PropTypes.string.isRequired,
@ -19,7 +19,7 @@ export default class GIFV extends React.PureComponent {
this.setState({ loading: false });
}
componentWillReceiveProps (nextProps) {
UNSAFE_componentWillReceiveProps (nextProps) {
if (nextProps.src !== this.props.src) {
this.setState({ loading: true });
}

View file

@ -1,5 +1,5 @@
// @ts-check
import React from 'react';
import { Component } from 'react';
import { Sparklines, SparklinesCurve } from 'react-sparklines';
import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
@ -9,7 +9,7 @@ import ShortNumber from 'mastodon/components/short_number';
import Skeleton from 'mastodon/components/skeleton';
import classNames from 'classnames';
class SilentErrorBoundary extends React.Component {
class SilentErrorBoundary extends Component {
static propTypes = {
children: PropTypes.node,
@ -68,7 +68,7 @@ const Hashtag = ({ name, href, to, people, uses, history, className }) => (
<div className={classNames('trends__item', className)}>
<div className='trends__item__name'>
<Permalink href={href} to={to}>
{name ? <React.Fragment>#<span>{name}</span></React.Fragment> : <Skeleton width={50} />}
{name ? <>#<span>{name}</span></> : <Skeleton width={50} />}
</Permalink>
{typeof people !== 'undefined' ? <ShortNumber value={people} renderer={accountsCountRenderer} /> : <Skeleton width={100} />}

View file

@ -1,8 +1,8 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
export default class Icon extends React.PureComponent {
export default class Icon extends PureComponent {
static propTypes = {
id: PropTypes.string.isRequired,

View file

@ -1,10 +1,10 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Icon from 'mastodon/components/icon';
import AnimatedNumber from 'mastodon/components/animated_number';
export default class IconButton extends React.PureComponent {
export default class IconButton extends PureComponent {
static propTypes = {
className: PropTypes.string,
@ -44,7 +44,7 @@ export default class IconButton extends React.PureComponent {
deactivate: false,
}
componentWillReceiveProps (nextProps) {
UNSAFE_componentWillReceiveProps (nextProps) {
if (!nextProps.animate) return;
if (this.props.active && !nextProps.active) {
@ -126,9 +126,9 @@ export default class IconButton extends React.PureComponent {
}
let contents = (
<React.Fragment>
<>
<Icon id={icon} fixedWidth aria-hidden='true' /> {typeof counter !== 'undefined' && <span className='icon-button__counter'><AnimatedNumber value={counter} obfuscate={obfuscateCount} /></span>}
</React.Fragment>
</>
);
if (href) {

View file

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

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
import { makeGetAccount } from 'mastodon/selectors';
@ -15,7 +15,7 @@ const makeMapStateToProps = () => {
};
export default @connect(makeMapStateToProps)
class InlineAccount extends React.PureComponent {
class InlineAccount extends PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { cloneElement, Component } from 'react';
import PropTypes from 'prop-types';
import scheduleIdleTask from '../features/ui/util/schedule_idle_task';
import getRectFromEntry from '../features/ui/util/get_rect_from_entry';
@ -6,7 +6,7 @@ import getRectFromEntry from '../features/ui/util/get_rect_from_entry';
// Diff these props in the "unrendered" state
const updateOnPropsForUnrendered = ['id', 'index', 'listLength', 'cachedHeight'];
export default class IntersectionObserverArticle extends React.Component {
export default class IntersectionObserverArticle extends Component {
static propTypes = {
intersectionObserverWrapper: PropTypes.object.isRequired,
@ -115,14 +115,14 @@ export default class IntersectionObserverArticle extends React.Component {
data-id={id}
tabIndex='0'
>
{children && React.cloneElement(children, { hidden: true })}
{children && cloneElement(children, { hidden: true })}
</article>
);
}
return (
<article ref={this.handleRef} aria-posinset={index + 1} aria-setsize={listLength} data-id={id} tabIndex='0'>
{children && React.cloneElement(children, { hidden: false })}
{children && cloneElement(children, { hidden: false })}
</article>
);
}

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
import Icon from 'mastodon/components/icon';
@ -8,7 +8,7 @@ const messages = defineMessages({
});
export default @injectIntl
class LoadGap extends React.PureComponent {
class LoadGap extends PureComponent {
static propTypes = {
disabled: PropTypes.bool,

View file

@ -1,8 +1,8 @@
import React from 'react';
import { PureComponent } from 'react';
import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
export default class LoadMore extends React.PureComponent {
export default class LoadMore extends PureComponent {
static propTypes = {
onClick: PropTypes.func,

View file

@ -1,8 +1,8 @@
import React from 'react';
import { PureComponent } from 'react';
import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
export default class LoadPending extends React.PureComponent {
export default class LoadPending extends PureComponent {
static propTypes = {
onClick: PropTypes.func,

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
export const CircularProgress = ({ size, strokeWidth }) => {

View file

@ -1,5 +1,3 @@
import React from 'react';
const Logo = () => (
<svg viewBox='0 0 216.4144 232.00976' className='logo'>
<use xlinkHref='#mastodon-svg-logo' />

View file

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

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { is } from 'immutable';
@ -14,7 +14,7 @@ const messages = defineMessages({
toggle_visible: { id: 'media_gallery.toggle_visible', defaultMessage: '{number, plural, one {Hide image} other {Hide images}}' },
});
class Item extends React.PureComponent {
class Item extends PureComponent {
static propTypes = {
attachment: ImmutablePropTypes.map.isRequired,
@ -221,7 +221,7 @@ class Item extends React.PureComponent {
}
export default @injectIntl
class MediaGallery extends React.PureComponent {
class MediaGallery extends PureComponent {
static propTypes = {
sensitive: PropTypes.bool,
@ -255,7 +255,7 @@ class MediaGallery extends React.PureComponent {
window.removeEventListener('resize', this.handleResize);
}
componentWillReceiveProps (nextProps) {
UNSAFE_componentWillReceiveProps (nextProps) {
if (!is(nextProps.media, this.props.media) && nextProps.visible === undefined) {
this.setState({ visible: displayMedia !== 'hide_all' && !nextProps.sensitive || displayMedia === 'show_all' });
} else if (!is(nextProps.visible, this.props.visible) && nextProps.visible !== undefined) {

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import illustration from 'mastodon/../images/elephant_ui_disappointed.svg';

View file

@ -1,10 +1,10 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import 'wicg-inert';
import { createBrowserHistory } from 'history';
import { multiply } from 'color-blend';
export default class ModalRoot extends React.PureComponent {
export default class ModalRoot extends PureComponent {
static contextTypes = {
router: PropTypes.object,
@ -57,7 +57,7 @@ export default class ModalRoot extends React.PureComponent {
this.history = this.context.router ? this.context.router.history : createBrowserHistory();
}
componentWillReceiveProps (nextProps) {
UNSAFE_componentWillReceiveProps (nextProps) {
if (!!nextProps.children && !this.props.children) {
this.activeElement = document.activeElement;

View file

@ -1,7 +1,7 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
export default class Permalink extends React.PureComponent {
export default class Permalink extends PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Icon from 'mastodon/components/icon';
import { removePictureInPicture } from 'mastodon/actions/picture_in_picture';
@ -7,7 +7,7 @@ import { debounce } from 'lodash';
import { FormattedMessage } from 'react-intl';
export default @connect()
class PictureInPicturePlaceholder extends React.PureComponent {
class PictureInPicturePlaceholder extends PureComponent {
static propTypes = {
width: PropTypes.number,

View file

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

View file

@ -1,8 +1,8 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
export default class RadioButton extends React.PureComponent {
export default class RadioButton extends PureComponent {
static propTypes = {
value: PropTypes.string.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import { FormattedMessage } from 'react-intl';
import illustration from 'mastodon/../images/elephant_ui_working.svg';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { Component } from 'react';
import { injectIntl, defineMessages } from 'react-intl';
import PropTypes from 'prop-types';
@ -122,7 +122,7 @@ const timeRemainingString = (intl, date, now, timeGiven = true) => {
};
export default @injectIntl
class RelativeTimestamp extends React.Component {
class RelativeTimestamp extends Component {
static propTypes = {
intl: PropTypes.object.isRequired,
@ -149,7 +149,7 @@ class RelativeTimestamp extends React.Component {
this.state.now !== nextState.now;
}
componentWillReceiveProps (nextProps) {
UNSAFE_componentWillReceiveProps (nextProps) {
if (this.props.timestamp !== nextProps.timestamp) {
this.setState({ now: this.props.intl.now() });
}
@ -159,7 +159,7 @@ class RelativeTimestamp extends React.Component {
this._scheduleNextUpdate(this.props, this.state);
}
componentWillUpdate (nextProps, nextState) {
UNSAFE_componentWillUpdate (nextProps, nextState) {
this._scheduleNextUpdate(nextProps, nextState);
}

View file

@ -1,4 +1,4 @@
import React, { PureComponent } from 'react';
import { Children, PureComponent, cloneElement } from 'react';
import ScrollContainer from 'mastodon/containers/scroll_container';
import PropTypes from 'prop-types';
import IntersectionObserverArticleContainer from '../containers/intersection_observer_article_container';
@ -182,8 +182,8 @@ class ScrollableList extends PureComponent {
}
getSnapshotBeforeUpdate (prevProps) {
const someItemInserted = React.Children.count(prevProps.children) > 0 &&
React.Children.count(prevProps.children) < React.Children.count(this.props.children) &&
const someItemInserted = Children.count(prevProps.children) > 0 &&
Children.count(prevProps.children) < Children.count(this.props.children) &&
this.getFirstChildKey(prevProps) !== this.getFirstChildKey(this.props);
const pendingChanged = (prevProps.numPending > 0) !== (this.props.numPending > 0);
@ -291,7 +291,7 @@ class ScrollableList extends PureComponent {
render () {
const { children, scrollKey, trackScroll, showLoading, isLoading, hasMore, numPending, prepend, alwaysPrepend, append, emptyMessage, onLoadMore } = this.props;
const { fullscreen } = this.state;
const childrenCount = React.Children.count(children);
const childrenCount = Children.count(children);
const loadMore = (hasMore && onLoadMore) ? <LoadMore visible={!isLoading} onClick={this.handleLoadMore} /> : null;
const loadPending = (numPending > 0) ? <LoadPending count={numPending} onClick={this.handleLoadPending} /> : null;
@ -317,7 +317,7 @@ class ScrollableList extends PureComponent {
{loadPending}
{React.Children.map(this.props.children, (child, index) => (
{Children.map(this.props.children, (child, index) => (
<IntersectionObserverArticleContainer
key={child.key}
id={child.key}
@ -326,7 +326,7 @@ class ScrollableList extends PureComponent {
intersectionObserverWrapper={this.intersectionObserverWrapper}
saveHeightKey={trackScroll ? `${this.context.router.route.location.key}:${scrollKey}` : null}
>
{React.cloneElement(child, {
{cloneElement(child, {
getScrollPosition: this.getScrollPosition,
updateScrollBottom: this.updateScrollBottom,
cachedMediaWidth: this.state.cachedMediaWidth,

View file

@ -1,8 +1,8 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
export default class SettingText extends React.PureComponent {
export default class SettingText extends PureComponent {
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { memo } from 'react';
import PropTypes from 'prop-types';
import { toShortNumber, pluralReady, DECIMAL_UNITS } from '../utils/numbers';
import { FormattedMessage, FormattedNumber } from 'react-intl';
@ -114,4 +114,4 @@ ShortNumberCounter.propTypes = {
value: PropTypes.arrayOf(PropTypes.number),
};
export default React.memo(ShortNumber);
export default memo(ShortNumber);

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
const Skeleton = ({ width, height }) => <span className='skeleton' style={{ width, height }}>&zwnj;</span>;

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Avatar from './avatar';

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
@ -10,7 +10,7 @@ import { autoPlayGif } from 'mastodon/initial_state';
const MAX_HEIGHT = 642; // 20px * 32 (+ 2px padding at the top)
export default class StatusContent extends React.PureComponent {
export default class StatusContent extends PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -1,5 +1,4 @@
import { debounce } from 'lodash';
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import StatusContainer from '../containers/status_container';

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { makeGetAccount } from '../selectors';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { IntlProvider, addLocaleData } from 'react-intl';
import { getLocale } from '../locales';
@ -6,7 +6,7 @@ import { getLocale } from '../locales';
const { localeData, messages } = getLocale();
addLocaleData(localeData);
export default class AdminComponent extends React.PureComponent {
export default class AdminComponent extends PureComponent {
static propTypes = {
locale: PropTypes.string.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import { Provider } from 'react-redux';
import PropTypes from 'prop-types';
import configureStore from '../store/configureStore';
@ -20,7 +20,7 @@ if (initialState) {
store.dispatch(fetchCustomEmojis());
export default class TimelineContainer extends React.PureComponent {
export default class TimelineContainer extends PureComponent {
static propTypes = {
locale: PropTypes.string.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import { blockDomain, unblockDomain } from '../actions/domain_blocks';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import { Provider } from 'react-redux';
import PropTypes from 'prop-types';
import configureStore from '../store/configureStore';
@ -28,7 +28,7 @@ const createIdentityContext = state => ({
accessToken: state.meta.access_token,
});
export default class Mastodon extends React.PureComponent {
export default class Mastodon extends PureComponent {
static propTypes = {
locale: PropTypes.string.isRequired,

View file

@ -1,5 +1,5 @@
import React, { PureComponent, Fragment } from 'react';
import ReactDOM from 'react-dom';
import { PureComponent } from 'react';
import { createPortal } from 'react-dom';
import PropTypes from 'prop-types';
import { IntlProvider, addLocaleData } from 'react-intl';
import { fromJS } from 'immutable';
@ -74,7 +74,7 @@ export default class MediaContainer extends PureComponent {
return (
<IntlProvider locale={locale} messages={messages}>
<Fragment>
<>
{[].map.call(components, (component, i) => {
const componentName = component.getAttribute('data-component');
const Component = MEDIA_COMPONENTS[componentName];
@ -94,7 +94,7 @@ export default class MediaContainer extends PureComponent {
}),
});
return ReactDOM.createPortal(
return createPortal(
<Component {...props} key={`media-${i}`} />,
component,
);
@ -113,7 +113,7 @@ export default class MediaContainer extends PureComponent {
/>
)}
</ModalRoot>
</Fragment>
</>
</IntlProvider>
);
}

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import Status from '../components/status';
import { makeGetStatus, makeGetPictureInPicture } from '../selectors';

View file

@ -1,5 +1,5 @@
import React, { Fragment } from 'react';
import ReactDOM from 'react-dom';
import { PureComponent } from 'react';
import { createPortal } from 'react-dom';
import { Provider } from 'react-redux';
import PropTypes from 'prop-types';
import configureStore from '../store/configureStore';
@ -20,7 +20,7 @@ if (initialState) {
store.dispatch(hydrateStore(initialState));
}
export default class TimelineContainer extends React.PureComponent {
export default class TimelineContainer extends PureComponent {
static propTypes = {
locale: PropTypes.string.isRequired,
@ -46,14 +46,14 @@ export default class TimelineContainer extends React.PureComponent {
return (
<IntlProvider locale={locale} messages={messages}>
<Provider store={store}>
<Fragment>
<>
{timeline}
{ReactDOM.createPortal(
{createPortal(
<ModalContainer />,
document.getElementById('modal-container'),
)}
</Fragment>
</>
</Provider>
</IntlProvider>
);

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
@ -10,7 +10,7 @@ const messages = defineMessages({
placeholder: { id: 'account_note.placeholder', defaultMessage: 'Click to add a note' },
});
class InlineAlert extends React.PureComponent {
class InlineAlert extends PureComponent {
static propTypes = {
show: PropTypes.bool,
@ -22,7 +22,7 @@ class InlineAlert extends React.PureComponent {
static TRANSITION_DELAY = 200;
componentWillReceiveProps (nextProps) {
UNSAFE_componentWillReceiveProps (nextProps) {
if (!this.props.show && nextProps.show) {
this.setState({ mountMessage: true });
} else if (this.props.show && !nextProps.show) {
@ -59,11 +59,11 @@ class AccountNote extends ImmutablePureComponent {
saved: false,
};
componentWillMount () {
UNSAFE_componentWillMount () {
this._reset();
}
componentWillReceiveProps (nextProps) {
UNSAFE_componentWillReceiveProps (nextProps) {
const accountWillChange = !is(this.props.account, nextProps.account);
const newState = {};

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
@ -282,10 +281,10 @@ class Header extends ImmutablePureComponent {
{!suspended && (
<div className='account__header__tabs__buttons'>
{!hidden && (
<React.Fragment>
<>
{actionBtn}
{bellBtn}
</React.Fragment>
</>
)}
<DropdownMenuContainer items={menu} icon='ellipsis-v' size={24} direction='right' />

View file

@ -4,7 +4,6 @@ import Icon from 'mastodon/components/icon';
import { autoPlayGif, displayMedia, useBlurhash } from 'mastodon/initial_state';
import { isIOS } from 'mastodon/is_mobile';
import PropTypes from 'prop-types';
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import InnerHeader from '../../account/components/header';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { revealAccount } from 'mastodon/actions/accounts';
@ -14,7 +14,7 @@ const mapDispatchToProps = (dispatch, { accountId }) => ({
});
export default @connect(() => {}, mapDispatchToProps)
class LimitedAccountHint extends React.PureComponent {
class LimitedAccountHint extends PureComponent {
static propTypes = {
accountId: PropTypes.string.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import { makeGetAccount, getAccountHidden } from '../../../selectors';
import Header from '../components/header';

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import { formatTime } from 'mastodon/features/video';
@ -21,7 +21,7 @@ const TICK_SIZE = 10;
const PADDING = 180;
export default @injectIntl
class Audio extends React.PureComponent {
class Audio extends PureComponent {
static propTypes = {
src: PropTypes.string.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
@ -36,7 +35,7 @@ class Blocks extends ImmutablePureComponent {
multiColumn: PropTypes.bool,
};
componentWillMount () {
UNSAFE_componentWillMount () {
this.props.dispatch(fetchBlocks());
}

View file

@ -1,4 +1,3 @@
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
@ -35,7 +34,7 @@ class Bookmarks extends ImmutablePureComponent {
isLoading: PropTypes.bool,
};
componentWillMount () {
UNSAFE_componentWillMount () {
this.props.dispatch(fetchBookmarkedStatuses());
}

View file

@ -1,11 +1,11 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, FormattedMessage } from 'react-intl';
import SettingToggle from '../../notifications/components/setting_toggle';
export default @injectIntl
class ColumnSettings extends React.PureComponent {
class ColumnSettings extends PureComponent {
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
@ -29,7 +29,7 @@ const mapStateToProps = (state, { columnId }) => {
export default @connect(mapStateToProps)
@injectIntl
class CommunityTimeline extends React.PureComponent {
class CommunityTimeline extends PureComponent {
static contextTypes = {
router: PropTypes.object,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
@ -20,7 +20,7 @@ const messages = defineMessages({
});
export default @injectIntl
class ActionBar extends React.PureComponent {
class ActionBar extends PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import Avatar from '../../../components/avatar';
import DisplayName from '../../../components/display_name';
import ImmutablePropTypes from 'react-immutable-proptypes';

View file

@ -1,8 +1,8 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { length } from 'stringz';
export default class CharacterCounter extends React.PureComponent {
export default class CharacterCounter extends PureComponent {
static propTypes = {
text: PropTypes.string.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import CharacterCounter from './character_counter';
import Button from '../../../components/button';
import ImmutablePropTypes from 'react-immutable-proptypes';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { EmojiPicker as EmojiPickerAsync } from '../../ui/util/async-components';
@ -47,7 +47,7 @@ const notFoundFn = () => (
</div>
);
class ModifierPickerMenu extends React.PureComponent {
class ModifierPickerMenu extends PureComponent {
static propTypes = {
active: PropTypes.bool,
@ -59,7 +59,7 @@ class ModifierPickerMenu extends React.PureComponent {
this.props.onSelect(e.currentTarget.getAttribute('data-index') * 1);
}
componentWillReceiveProps (nextProps) {
UNSAFE_componentWillReceiveProps (nextProps) {
if (nextProps.active) {
this.attachListeners();
} else {
@ -108,7 +108,7 @@ class ModifierPickerMenu extends React.PureComponent {
}
class ModifierPicker extends React.PureComponent {
class ModifierPicker extends PureComponent {
static propTypes = {
active: PropTypes.bool,
@ -145,7 +145,7 @@ class ModifierPicker extends React.PureComponent {
}
@injectIntl
class EmojiPickerMenu extends React.PureComponent {
class EmojiPickerMenu extends PureComponent {
static propTypes = {
custom_emojis: ImmutablePropTypes.list,
@ -309,7 +309,7 @@ class EmojiPickerMenu extends React.PureComponent {
}
export default @injectIntl
class EmojiPickerDropdown extends React.PureComponent {
class EmojiPickerDropdown extends PureComponent {
static propTypes = {
custom_emojis: ImmutablePropTypes.list,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
import TextIconButton from './text_icon_button';
@ -34,7 +34,7 @@ const icons = {
const listenerOptions = supportsPassiveEvents ? { passive: true } : false;
class LanguageDropdownMenu extends React.PureComponent {
class LanguageDropdownMenu extends PureComponent {
static propTypes = {
style: PropTypes.object,
@ -257,7 +257,7 @@ class LanguageDropdownMenu extends React.PureComponent {
}
export default @injectIntl
class LanguageDropdown extends React.PureComponent {
class LanguageDropdown extends PureComponent {
static propTypes = {
value: PropTypes.string,

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ActionBar from './action_bar';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import IconButton from '../../../components/icon_button';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
@ -15,7 +15,7 @@ const iconStyle = {
export default
@injectIntl
class PollButton extends React.PureComponent {
class PollButton extends PureComponent {
static propTypes = {
disabled: PropTypes.bool,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
@ -21,7 +21,7 @@ const messages = defineMessages({
});
@injectIntl
class Option extends React.PureComponent {
class Option extends PureComponent {
static propTypes = {
title: PropTypes.string.isRequired,

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
import IconButton from '../../../components/icon_button';
@ -23,7 +23,7 @@ const messages = defineMessages({
const listenerOptions = supportsPassiveEvents ? { passive: true } : false;
class PrivacyDropdownMenu extends React.PureComponent {
class PrivacyDropdownMenu extends PureComponent {
static propTypes = {
style: PropTypes.object,
@ -149,7 +149,7 @@ class PrivacyDropdownMenu extends React.PureComponent {
}
export default @injectIntl
class PrivacyDropdown extends React.PureComponent {
class PrivacyDropdown extends PureComponent {
static propTypes = {
isUserTouching: PropTypes.func,
@ -231,7 +231,7 @@ class PrivacyDropdown extends React.PureComponent {
this.props.onChange(value);
}
componentWillMount () {
UNSAFE_componentWillMount () {
const { intl: { formatMessage } } = this.props;
this.options = [

View file

@ -1,4 +1,3 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Avatar from '../../../components/avatar';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import Overlay from 'react-overlays/lib/Overlay';
@ -11,7 +11,7 @@ const messages = defineMessages({
placeholder: { id: 'search.placeholder', defaultMessage: 'Search' },
});
class SearchPopout extends React.PureComponent {
class SearchPopout extends PureComponent {
static propTypes = {
style: PropTypes.object,
@ -45,7 +45,7 @@ class SearchPopout extends React.PureComponent {
}
export default @injectIntl
class Search extends React.PureComponent {
class Search extends PureComponent {
static contextTypes = {
router: PropTypes.object.isRequired,

View file

@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';

View file

@ -1,4 +1,4 @@
import React from 'react';
import { PureComponent } from 'react';
import PropTypes from 'prop-types';
const iconStyle = {
@ -7,7 +7,7 @@ const iconStyle = {
width: `${18 * 1.28571429}px`,
};
export default class TextIconButton extends React.PureComponent {
export default class TextIconButton extends PureComponent {
static propTypes = {
label: PropTypes.string.isRequired,

Some files were not shown because too many files have changed in this diff Show more