Added webpack.ProvidePlugin for most used imports
Removed imports of React, connect, PropTypes throughout Removed the "React" in React.Component/PureComponent
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import PropTypes from 'prop-types';
|
||||
import { is } from 'immutable';
|
||||
import IconButton from './icon_button';
|
||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||
@@ -13,7 +11,7 @@ const messages = defineMessages({
|
||||
toggle_visible: { id: 'media_gallery.toggle_visible', defaultMessage: 'Toggle visibility' },
|
||||
});
|
||||
|
||||
class Item extends React.PureComponent {
|
||||
class Item extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
attachment: ImmutablePropTypes.map.isRequired,
|
||||
@@ -232,7 +230,7 @@ class Item extends React.PureComponent {
|
||||
}
|
||||
|
||||
export default @injectIntl
|
||||
class MediaGallery extends React.PureComponent {
|
||||
class MediaGallery extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
sensitive: PropTypes.bool,
|
||||
|
||||
Reference in New Issue
Block a user