fix(ui): fix flash of mini preview image

Restored the code that fixes this after having ripped it out thinking it didn't do anything. Spotted in #2915
This commit is contained in:
psychedelicious
2023-03-12 03:40:48 +11:00
parent 777d127c74
commit b4d976f2db

View File

@ -45,6 +45,8 @@ export default function CurrentImagePreview() {
{imageToDisplay && ( {imageToDisplay && (
<Image <Image
src={imageToDisplay.url} src={imageToDisplay.url}
width={imageToDisplay.width}
height={imageToDisplay.height}
sx={{ sx={{
objectFit: 'contain', objectFit: 'contain',
maxWidth: '100%', maxWidth: '100%',
@ -54,10 +56,6 @@ export default function CurrentImagePreview() {
imageRendering: isIntermediate ? 'pixelated' : 'initial', imageRendering: isIntermediate ? 'pixelated' : 'initial',
borderRadius: 'base', borderRadius: 'base',
}} }}
{...(isIntermediate && {
width: imageToDisplay.width,
height: imageToDisplay.height,
})}
/> />
)} )}
{!shouldShowImageDetails && <NextPrevImageButtons />} {!shouldShowImageDetails && <NextPrevImageButtons />}