Remove React, PureComponent global import, added those imports to files directly
• Remove: - React, PureComponent global import and added those imports to files directly
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { injectIntl, defineMessages } from 'react-intl'
|
||||
import { makeGetAccount } from '../../selectors'
|
||||
import { blockAccount } from '../../actions/accounts'
|
||||
@@ -26,7 +27,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
export default
|
||||
@connect(mapStateToProps, mapDispatchToProps)
|
||||
@injectIntl
|
||||
class BlockAccountModal extends PureComponent {
|
||||
class BlockAccountModal extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
account: PropTypes.object.isRequired,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ConfirmationModal from './confirmation_modal'
|
||||
|
||||
@@ -9,7 +10,7 @@ const messages = defineMessages({
|
||||
|
||||
export default
|
||||
@injectIntl
|
||||
class BundleErrorModal extends PureComponent {
|
||||
class BundleErrorModal extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
onRetry: PropTypes.func.isRequired,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import { openModal } from '../../actions/modal'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { injectIntl, FormattedMessage } from 'react-intl'
|
||||
import Block from '../block'
|
||||
import Button from '../button'
|
||||
@@ -6,7 +7,7 @@ import Text from '../text'
|
||||
|
||||
export default
|
||||
@injectIntl
|
||||
class ConfirmationModal extends PureComponent {
|
||||
class ConfirmationModal extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
title: PropTypes.any.isRequired,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { injectIntl, defineMessages } from 'react-intl'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
@@ -198,7 +199,7 @@ class DisplayOptionsModal extends ImmutablePureComponent {
|
||||
|
||||
}
|
||||
|
||||
class ThemeBlock extends PureComponent {
|
||||
class ThemeBlock extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
checked: PropTypes.bool,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Fragment } from 'react'
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
@@ -183,7 +183,7 @@ class EditProfileModal extends ImmutablePureComponent {
|
||||
<div className={[_s.default, _s.py5, _s.px15, _s.mt5, _s.mb15, _s.width100PC].join(' ')}>
|
||||
{
|
||||
!isVerified &&
|
||||
<Fragment>
|
||||
<React.Fragment>
|
||||
<Input
|
||||
id='display-name'
|
||||
title='Display name'
|
||||
@@ -192,7 +192,7 @@ class EditProfileModal extends ImmutablePureComponent {
|
||||
onBlur={this.handleDisplayNameBlur}
|
||||
/>
|
||||
<Divider isInvisible />
|
||||
</Fragment>
|
||||
</React.Fragment>
|
||||
}
|
||||
|
||||
<Textarea
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import api from '../../api'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import {
|
||||
fetchGifCategories,
|
||||
@@ -64,7 +65,7 @@ const mapDispatchToProps = (dispatch, { onClose }) => ({
|
||||
export default
|
||||
@connect(mapStateToProps, mapDispatchToProps)
|
||||
@injectIntl
|
||||
class GifPickerModal extends PureComponent {
|
||||
class GifPickerModal extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
intl: PropTypes.object.isRequired,
|
||||
@@ -165,7 +166,7 @@ class GifPickerModal extends PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
class GifResultsCollectionColumn extends PureComponent {
|
||||
class GifResultsCollectionColumn extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
results: PropTypes.array.isRequired,
|
||||
@@ -201,7 +202,7 @@ class GifResultsCollectionColumn extends PureComponent {
|
||||
|
||||
}
|
||||
|
||||
class GifResultsCollection extends PureComponent {
|
||||
class GifResultsCollection extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
results: PropTypes.array.isRequired,
|
||||
@@ -234,7 +235,7 @@ class GifResultsCollection extends PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
class GifCategoriesCollection extends PureComponent {
|
||||
class GifCategoriesCollection extends React.PureComponent {
|
||||
static propTypes = {
|
||||
categories: PropTypes.array.isRequired,
|
||||
handleSelectCategory: PropTypes.func.isRequired,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ModalLayout from './modal_layout'
|
||||
import GroupCreate from '../../features/group_create'
|
||||
@@ -9,7 +10,7 @@ const messages = defineMessages({
|
||||
|
||||
export default
|
||||
@injectIntl
|
||||
class GroupCreateModal extends PureComponent {
|
||||
class GroupCreateModal extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
intl: PropTypes.object.isRequired,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { injectIntl, defineMessages } from 'react-intl'
|
||||
import { makeGetAccount } from '../../selectors'
|
||||
import { blockAccount } from '../../actions/accounts'
|
||||
@@ -18,7 +19,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
export default
|
||||
@connect(null, mapDispatchToProps)
|
||||
@injectIntl
|
||||
class GroupDeleteModal extends PureComponent {
|
||||
class GroupDeleteModal extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
group: PropTypes.object.isRequired,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import Button from '../button'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import ModalLayout from './modal_layout'
|
||||
@@ -126,7 +127,7 @@ class HotkeysModal extends ImmutablePureComponent {
|
||||
|
||||
}
|
||||
|
||||
class HotKeysModalRow extends PureComponent {
|
||||
class HotKeysModalRow extends React.PureComponent {
|
||||
static propTypes = {
|
||||
hotkey: PropTypes.string.isRequired,
|
||||
action: PropTypes.string.isRequired,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import ModalLayout from './modal_layout'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import { injectIntl, defineMessages } from 'react-intl'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import ModalLayout from './modal_layout'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import React from 'react'
|
||||
import Block from '../block'
|
||||
import ColumnIndicator from '../column_indicator'
|
||||
|
||||
export default class LoadingModal extends PureComponent {
|
||||
export default class LoadingModal extends React.PureComponent {
|
||||
|
||||
render() {
|
||||
return (
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ReactSwipeableViews from 'react-swipeable-views'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Fragment } from 'react'
|
||||
import React from 'react'
|
||||
import { injectIntl, FormattedMessage, defineMessages } from 'react-intl'
|
||||
import { getWindowDimension } from '../../utils/is_mobile'
|
||||
import { openModal } from '../../actions/modal'
|
||||
@@ -33,7 +33,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
export default
|
||||
@connect(mapStateToProps, mapDispatchToProps)
|
||||
@injectIntl
|
||||
class ModalBase extends PureComponent {
|
||||
class ModalBase extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
children: PropTypes.node,
|
||||
@@ -167,7 +167,7 @@ class ModalBase extends PureComponent {
|
||||
<div ref={this.setRef} className={containerClasses}>
|
||||
{
|
||||
!!visible &&
|
||||
<Fragment>
|
||||
<React.Fragment>
|
||||
<div
|
||||
role='presentation'
|
||||
className={[_s.default, _s.bgBlackOpaque, _s.posFixed, _s.z3, _s.top0, _s.right0, _s.bottom0, _s.left0].join(' ')}
|
||||
@@ -180,7 +180,7 @@ class ModalBase extends PureComponent {
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
</Fragment>
|
||||
</React.Fragment>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import classNames from 'classnames/bind'
|
||||
import Button from '../button'
|
||||
@@ -12,7 +13,7 @@ const messages = defineMessages({
|
||||
|
||||
export default
|
||||
@injectIntl
|
||||
class ModalLayout extends PureComponent {
|
||||
class ModalLayout extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
title: PropTypes.string,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { closeModal } from '../../actions/modal'
|
||||
import { cancelReplyCompose } from '../../actions/compose'
|
||||
import Bundle from '../../features/ui/util/bundle'
|
||||
@@ -130,7 +131,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
export default
|
||||
@connect(mapStateToProps, mapDispatchToProps)
|
||||
class ModalRoot extends PureComponent {
|
||||
class ModalRoot extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
type: PropTypes.string,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { injectIntl, defineMessages } from 'react-intl'
|
||||
import { makeGetAccount } from '../../selectors'
|
||||
import { muteAccount } from '../../actions/accounts'
|
||||
@@ -26,7 +27,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
export default
|
||||
@connect(mapStateToProps, mapDispatchToProps)
|
||||
@injectIntl
|
||||
class MuteModal extends PureComponent {
|
||||
class MuteModal extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
account: PropTypes.object.isRequired,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import { OrderedSet } from 'immutable'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import ModalLayout from './modal_layout'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import { FormattedMessage } from 'react-intl'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import { FormattedMessage } from 'react-intl'
|
||||
|
||||
Reference in New Issue
Block a user