1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-28 14:16:41 +07:00

fixed image switcher

This commit is contained in:
Fedor Katurov 2020-04-23 11:56:02 +07:00
parent 79c5c3be8d
commit b385df297a
2 changed files with 14 additions and 22 deletions

View file

@ -62,13 +62,6 @@ const NodeImageBlock: FC<IProps> = ({ node, is_loading, updateLayout, modalShowP
return (
<div className={classNames(styles.wrap, { is_loading, is_animated })}>
<ImageSwitcher
total={images.length}
current={current}
onChange={setCurrent}
loaded={loaded}
/>
<div className={styles.image_container} style={{ height }} onClick={onOpenPhotoSwipe}>
{(is_loading || !loaded[0] || !images.length) && (
<div className={styles.placeholder}>
@ -94,6 +87,13 @@ const NodeImageBlock: FC<IProps> = ({ node, is_loading, updateLayout, modalShowP
</div>
))}
</div>
<ImageSwitcher
total={images.length}
current={current}
onChange={setCurrent}
loaded={loaded}
/>
</div>
);
};