pl-fe: fix regression in uploaded media preview

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-01-07 16:45:17 +01:00
parent 83d96c7cc5
commit fefe2a5e60

View File

@ -172,7 +172,11 @@ const Upload: React.FC<IUpload> = ({
<Blurhash hash={media.blurhash} className='⁂-media-gallery__preview' />
<animated.div
className={clsx('compose-form__upload-thumbnail relative h-40 w-full overflow-hidden bg-contain bg-center bg-no-repeat', mediaType)}
style={styles}
style={{
scale: styles.scale,
backgroundImage: mediaType === 'image' ? `url(${media.preview_url})` : undefined,
backgroundPosition: typeof x === 'number' && typeof y === 'number' ? `${x}% ${y}%` : undefined,
}}
>
<HStack className='absolute right-2 top-2 z-10' space={2}>
{onDescriptionChange && (