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
|
||||
src={blobUrl}
|
||||
alt={alt}
|
||||
decoding="async"
|
||||
onClick={onImageClick}
|
||||
className={classNames('w-full h-full object-contain transition-opacity duration-300', {
|
||||
'opacity-100': loaded,
|
||||
'opacity-0': !loaded,
|
||||
className={classNames('w-full h-full object-contain', {
|
||||
'cursor-zoom-in': !!onImageClick,
|
||||
})}
|
||||
/>
|
||||
|
||||
@@ -133,14 +133,7 @@ const SampleImageCard: React.FC<SampleImageCardProps> = ({
|
||||
controls={false}
|
||||
/>
|
||||
) : blobUrl ? (
|
||||
<img
|
||||
src={blobUrl}
|
||||
alt={alt}
|
||||
decoding="async"
|
||||
className={`w-full h-full object-cover transition-opacity duration-300 ${
|
||||
loaded ? 'opacity-100' : 'opacity-0'
|
||||
}`}
|
||||
/>
|
||||
<img src={blobUrl} alt={alt} className="w-full h-full object-cover" />
|
||||
) : null
|
||||
) : null}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user