fix(ui): ref goes undefined in GalleryImage

This appears to be a bug in Chakra UI v2 - use of a fallback component makes the ref passed to an image end up undefined. Had to remove the skeleton loader fallback component.
This commit is contained in:
psychedelicious
2025-05-30 21:32:44 +10:00
parent 1446d3490b
commit eb45a457e9

View File

@@ -15,7 +15,6 @@ import { firefoxDndFix } from 'features/dnd/util';
import { useImageContextMenu } from 'features/gallery/components/ImageContextMenu/ImageContextMenu';
import { GalleryImageHoverIcons } from 'features/gallery/components/ImageGrid/GalleryImageHoverIcons';
import { getGalleryImageDataTestId } from 'features/gallery/components/ImageGrid/getGalleryImageDataTestId';
import { SizedSkeletonLoader } from 'features/gallery/components/ImageGrid/SizedSkeletonLoader';
import { $imageViewer } from 'features/gallery/components/ImageViewer/useImageViewer';
import { imageToCompareChanged, selectGallerySlice } from 'features/gallery/store/gallerySlice';
import type { MouseEventHandler } from 'react';
@@ -235,7 +234,6 @@ export const GalleryImage = memo(({ imageDTO }: Props) => {
<Image
ref={ref}
src={imageDTO.thumbnail_url}
fallback={<SizedSkeletonLoader width={imageDTO.width} height={imageDTO.height} />}
w={imageDTO.width}
objectFit="contain"
maxW="full"