Remove react-imageloader (#3423)
* Remove react-imageloader * add eslint-disable-line * improve image loading experience * remove unneeded import * use PureComponent * Use componentWillMount instead of constructor
This commit is contained in:
parent
e49dc6a06e
commit
c00ead8a72
5 changed files with 57 additions and 12 deletions
|
@ -3,10 +3,10 @@ import LoadingIndicator from '../../../components/loading_indicator';
|
|||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import PropTypes from 'prop-types';
|
||||
import ExtendedVideoPlayer from '../../../components/extended_video_player';
|
||||
import ImageLoader from 'react-imageloader';
|
||||
import { defineMessages, injectIntl } from 'react-intl';
|
||||
import IconButton from '../../../components/icon_button';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import ImageLoader from './image_loader';
|
||||
|
||||
const messages = defineMessages({
|
||||
close: { id: 'lightbox.close', defaultMessage: 'Close' },
|
||||
|
@ -73,7 +73,7 @@ class MediaModal extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
if (attachment.get('type') === 'image') {
|
||||
content = <ImageLoader src={url} imgProps={{ style: { display: 'block' } }} />;
|
||||
content = <ImageLoader src={url} />;
|
||||
} else if (attachment.get('type') === 'gifv') {
|
||||
content = <ExtendedVideoPlayer src={url} muted={true} controls={false} />;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue