Rewrite GIFV component with React hooks (#24552)
This commit is contained in:
parent
e5c0b16735
commit
cf3fa1e814
4 changed files with 70 additions and 78 deletions
|
@ -383,7 +383,7 @@ class FocalPointModal extends ImmutablePureComponent {
|
|||
{focals && (
|
||||
<div className={classNames('focal-point', { dragging })} ref={this.setRef} onMouseDown={this.handleMouseDown} onTouchStart={this.handleTouchStart}>
|
||||
{media.get('type') === 'image' && <ImageLoader src={media.get('url')} width={width} height={height} alt='' />}
|
||||
{media.get('type') === 'gifv' && <GIFV src={media.get('url')} width={width} height={height} />}
|
||||
{media.get('type') === 'gifv' && <GIFV src={media.get('url')} key={media.get('url')} width={width} height={height} />}
|
||||
|
||||
<div className='focal-point__preview'>
|
||||
<strong><FormattedMessage id='upload_modal.preview_label' defaultMessage='Preview ({ratio})' values={{ ratio: '16:9' }} /></strong>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue