Skip to content

Commit

Permalink
スクロール位置が保存されました ランキング機能の作成 #26
Browse files Browse the repository at this point in the history
  • Loading branch information
K-Yoshizawa committed Oct 24, 2024
1 parent 0f022d9 commit 45f0d75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/hooks/useFetchRanking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ export function useFetchRanking( limit = 20 ){

setLoading(false);

window.scrollTo(0, scrollPosition.current);
requestAnimationFrame(() => {
window.scrollTo(0, scrollPosition.current);
});
}, [page, limit]);

useEffect(() => {
Expand Down

0 comments on commit 45f0d75

Please sign in to comment.