mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
added experimental scroll helper
This commit is contained in:
parent
c2154e930c
commit
8d1e6989c2
8 changed files with 105 additions and 4 deletions
|
@ -14,7 +14,6 @@ export const useScrollToTop = (deps?: any[]) => {
|
|||
const bounds = targetElement.getBoundingClientRect();
|
||||
window.scrollTo({
|
||||
top: bounds.top - 100,
|
||||
behavior: 'smooth',
|
||||
});
|
||||
},
|
||||
deps && Array.isArray(deps) ? deps : []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue