diff options
Diffstat (limited to 'src/hooks')
-rw-r--r-- | src/hooks/useNavigate.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hooks/useNavigate.tsx b/src/hooks/useNavigate.tsx index befc529..d1a433d 100644 --- a/src/hooks/useNavigate.tsx +++ b/src/hooks/useNavigate.tsx @@ -11,7 +11,7 @@ interface ContextType { navigate: (prefix: string, id?: string) => void; } -const landingPage = { prefix: 'feed' }; +const landingPage = { prefix: 'home' }; const context = createContext<ContextType>({ page: landingPage, @@ -24,6 +24,7 @@ const useProvideNavigation = () => { const navigate: ContextType['navigate'] = (prefix, id?) => { setPage({ prefix, id }); + window.scrollTo(0, 0); }; return { page, setPage, navigate }; |