mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
#35 refactored node layout
This commit is contained in:
parent
428c7e7a06
commit
d3473eab4c
20 changed files with 406 additions and 344 deletions
7
src/utils/hooks/useScrollToTop.ts
Normal file
7
src/utils/hooks/useScrollToTop.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import { useEffect } from 'react';
|
||||
|
||||
export const useScrollToTop = (deps?: any[]) => {
|
||||
useEffect(() => {
|
||||
window.scrollTo(0, 0);
|
||||
}, deps || []);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue