[Glitch] Fix Bundle being used with incorrect prop types by using type-dependent key
Port 0e6180a5afdecca880ec94077b7086dcbcaa29ab to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
7c9d73d1cb
commit
fe869936ab
@ -565,7 +565,7 @@ class Status extends ImmutablePureComponent {
|
||||
);
|
||||
} else if (['image', 'gifv', 'unknown'].includes(status.getIn(['media_attachments', 0, 'type'])) || status.get('media_attachments').size > 1) {
|
||||
media.push(
|
||||
<Bundle fetchComponent={MediaGallery} loading={this.renderLoadingMediaGallery}>
|
||||
<Bundle fetchComponent={MediaGallery} loading={this.renderLoadingMediaGallery} key='gallery'>
|
||||
{Component => (
|
||||
<Component
|
||||
media={attachments}
|
||||
@ -590,7 +590,7 @@ class Status extends ImmutablePureComponent {
|
||||
const description = attachment.getIn(['translation', 'description']) || attachment.get('description');
|
||||
|
||||
media.push(
|
||||
<Bundle fetchComponent={Audio} loading={this.renderLoadingAudioPlayer} >
|
||||
<Bundle fetchComponent={Audio} loading={this.renderLoadingAudioPlayer} key='audio'>
|
||||
{Component => (
|
||||
<Component
|
||||
src={attachment.get('url')}
|
||||
@ -617,7 +617,7 @@ class Status extends ImmutablePureComponent {
|
||||
const description = attachment.getIn(['translation', 'description']) || attachment.get('description');
|
||||
|
||||
media.push(
|
||||
<Bundle fetchComponent={Video} loading={this.renderLoadingVideoPlayer} >
|
||||
<Bundle fetchComponent={Video} loading={this.renderLoadingVideoPlayer} key='video'>
|
||||
{Component => (<Component
|
||||
preview={attachment.get('preview_url')}
|
||||
frameRate={attachment.getIn(['meta', 'original', 'frame_rate'])}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user