1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

resetting offset on node change

This commit is contained in:
Fedor Katurov 2020-04-28 13:59:34 +07:00
parent 071e5968c8
commit 3301629920

View file

@ -265,6 +265,10 @@ const NodeImageSlideBlock: FC<IProps> = ({
return () => window.removeEventListener('keydown', onKeyDown);
}, [onKeyDown]);
useEffect(() => {
setOffset(0);
}, [node.id]);
return (
<div className={styles.wrap}>
<div className={classNames(styles.cutter, { [styles.is_loading]: is_loading })} ref={wrap}>