Skip to content

Commit 905cb8e

Browse files
remove window scrolly
1 parent b794ab0 commit 905cb8e

File tree

4 files changed

+0
-36
lines changed

4 files changed

+0
-36
lines changed

src/app/page.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,13 @@ import { ContextQuote } from '@/context/ContextQuote'
1111
import { ContextTopTenPosts } from '@/context/ContextTopTenPosts'
1212
import { ContextTopUsers } from '@/context/ContextTopUsers'
1313
import { useFocusTrap } from '@/hooks/useFocusTrap'
14-
import { useSetWindowScrollY } from '@/hooks/useSetWindowScrollY'
1514

1615
export default function Home() {
1716
const quoteRef = useRef<HTMLQuoteElement>(null)
1817
const topTenPostsRef = useRef<HTMLDivElement | null>(null)
1918
const topUsersRef = useRef<HTMLDivElement | null>(null)
2019

2120
useFocusTrap()
22-
useSetWindowScrollY()
2321

2422
return (
2523
<div className="min-h-svh flex flex-col items-center justify-start bg-gradient-to-b from-stone-700 to-stone-800">

src/components/feed/Feed.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import fetchFeedItems from '@/api/fetchFeedItems'
2424
import { ContextTopTenPosts } from '@/context/ContextTopTenPosts'
2525
import { FeedItemsType } from '@/types/types'
2626
import { getItemFromSessionStorage } from '@/utils/getItemFromSessionStorage'
27-
import { getWindowScrollY } from '@/utils/getWindowScrollY'
2827

2928
const Feed = () => {
3029
const contextTopTenPosts = useContext(ContextTopTenPosts)
@@ -56,8 +55,6 @@ const Feed = () => {
5655

5756
if (!parsedStorageData?.feedItems?.length) {
5857
loadMoreItems()
59-
} else {
60-
getWindowScrollY()
6158
}
6259
}, [loadMoreItems])
6360

src/hooks/useSetWindowScrollY.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/utils/getWindowScrollY.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)