Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOTFIX] 무한스크롤 계속 스크롤 되는 버그 #274

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

1yoouoo
Copy link
Contributor

@1yoouoo 1yoouoo commented Aug 23, 2023

개요 🔍

무한스크롤에 hasNext가 true로 계속 스크롤이 되는 이슈 해결

@1yoouoo 1yoouoo self-assigned this Aug 23, 2023
@@ -22,7 +22,7 @@ const useInfinityScroll = <TPage>({
const { data, fetchNextPage, hasNextPage, isFetchingNextPage } = useInfiniteQuery({
queryKey,
queryFn: ({ pageParam }) => {
return fetchFn(pageParam || '');
return fetchFn({ linkId: pageParam } || '');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

params가 linkId인데 linkId를 못찾아서 빈값이 계속 갔었네요

원래 잘 됐던 코드인데 왜 갑자기 이상했던건지 모르겠네요

@1yoouoo 1yoouoo added the 🔨 수정 버그 수정 label Aug 23, 2023
@dev-hamster dev-hamster merged commit 7cbe2d1 into dev Aug 23, 2023
2 checks passed
@dev-hamster dev-hamster deleted the fix/infi-scroll branch August 23, 2023 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 수정 버그 수정
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants