mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 21:06:42 +07:00
resetting offset on node change
This commit is contained in:
parent
071e5968c8
commit
3301629920
1 changed files with 4 additions and 0 deletions
|
@ -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}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue