1
0
Fork 0
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:
Fedor Katurov 2022-01-10 16:47:29 +07:00
parent c2154e930c
commit 8d1e6989c2
8 changed files with 105 additions and 4 deletions

View file

@ -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 : []