add side bar scroll animation

This commit is contained in:
Simon Vieille 2023-11-14 23:08:09 +01:00
parent 053f4aa5b8
commit 90603f62e0
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -24,7 +24,10 @@ const Sidebar = () => {
})
if (currentItem) {
stickyMenu.scroll({top: localStorage.getItem('sidebar-item-top') ?? 0})
stickyMenu.scrollTo({
top: localStorage.getItem('sidebar-item-top') ?? 0,
behavior: 'smooth'
})
}
}