[Glitch] Fix Bundle being used with incorrect prop types by using type-dependent key

Port 0e6180a5af to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Claire committed 2026-04-17 18:12:03 +02:00
1 parent 7c9d73d1cb
commit fe869936ab
1 file changed
+3 -3
@@ -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'])}