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