We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 464fef6 commit 9e8ab22Copy full SHA for 9e8ab22
1 file changed
src/hooks/useScrollPosition.js
@@ -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