1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

fixed is_loading display

This commit is contained in:
Fedor Katurov 2020-09-01 17:05:29 +07:00
parent a0d18076ad
commit 54dd5ef478

View file

@ -291,26 +291,25 @@ const NodeImageSlideBlock: FC<IProps> = ({
onTouchStart={startDragging}
ref={slide}
>
{images.map((file, index) => (
<div
className={classNames(styles.image_wrap, {
is_active: index === current && loaded[index],
})}
ref={setRef(index)}
key={node.updated_at + file.id}
>
<img
className={styles.image}
src={getURL(file, PRESETS['1600'])}
alt=""
key={file.id}
onLoad={onImageLoad(index)}
style={{
maxHeight: max_height,
}}
/>
</div>
))}
{!is_loading &&
images.map((file, index) => (
<div
className={classNames(styles.image_wrap, {
is_active: index === current && loaded[index],
})}
ref={setRef(index)}
key={node.updated_at + file.id}
>
<img
className={styles.image}
src={getURL(file, PRESETS['1600'])}
alt=""
key={file.id}
onLoad={onImageLoad(index)}
style={{ maxHeight: max_height }}
/>
</div>
))}
</div>
{images.length > 1 && (