Skip to content

Commit 9e8ab22

Browse files
committed
feat: useScrollPosition 커스텀 훅 추가
1 parent 464fef6 commit 9e8ab22

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/hooks/useScrollPosition.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import useSessionStorage from './useSessionStorage';
2+
3+
const SCROLL_POSITION_KEY = 'prevPostIndex';
4+
5+
export default () => useSessionStorage(SCROLL_POSITION_KEY, 0);

0 commit comments

Comments
 (0)