add side bar scroll animation
This commit is contained in:
parent
053f4aa5b8
commit
90603f62e0
|
@ -24,7 +24,10 @@ const Sidebar = () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
if (currentItem) {
|
if (currentItem) {
|
||||||
stickyMenu.scroll({top: localStorage.getItem('sidebar-item-top') ?? 0})
|
stickyMenu.scrollTo({
|
||||||
|
top: localStorage.getItem('sidebar-item-top') ?? 0,
|
||||||
|
behavior: 'smooth'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue