Fixed issue where some image cards in samples and datasets would show gray instead of the image until you scroll.
This commit is contained in:
@@ -221,11 +221,8 @@ const DatasetImageCard: React.FC<DatasetImageCardProps> = ({
|
|||||||
<img
|
<img
|
||||||
src={blobUrl}
|
src={blobUrl}
|
||||||
alt={alt}
|
alt={alt}
|
||||||
decoding="async"
|
|
||||||
onClick={onImageClick}
|
onClick={onImageClick}
|
||||||
className={classNames('w-full h-full object-contain transition-opacity duration-300', {
|
className={classNames('w-full h-full object-contain', {
|
||||||
'opacity-100': loaded,
|
|
||||||
'opacity-0': !loaded,
|
|
||||||
'cursor-zoom-in': !!onImageClick,
|
'cursor-zoom-in': !!onImageClick,
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -133,14 +133,7 @@ const SampleImageCard: React.FC<SampleImageCardProps> = ({
|
|||||||
controls={false}
|
controls={false}
|
||||||
/>
|
/>
|
||||||
) : blobUrl ? (
|
) : blobUrl ? (
|
||||||
<img
|
<img src={blobUrl} alt={alt} className="w-full h-full object-cover" />
|
||||||
src={blobUrl}
|
|
||||||
alt={alt}
|
|
||||||
decoding="async"
|
|
||||||
className={`w-full h-full object-cover transition-opacity duration-300 ${
|
|
||||||
loaded ? 'opacity-100' : 'opacity-0'
|
|
||||||
}`}
|
|
||||||
/>
|
|
||||||
) : null
|
) : null
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user