Skip to content

Commit

Permalink
fix: 무한 retry현상 수정
Browse files Browse the repository at this point in the history
- useinfiniteQuery hook에서 retry횟수 추가
- intersection hook에서 enable기본 값을 false로 수정

close #63
  • Loading branch information
ppark2ya committed Feb 19, 2022
1 parent b967df1 commit c6bc185
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions data/services/services.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ export function useInfinityContents(
['/services/main_contents', contentsSearchParams],
getMainContents,
{
...options,
retry: 2,
refetchOnWindowFocus: false,
...options,
},
);
}
Expand All @@ -72,8 +73,8 @@ export function useInfinityWriters(
getMainWriters,
{
retry: 2,
...options,
refetchOnWindowFocus: false,
...options,
},
);
}
Expand Down
2 changes: 1 addition & 1 deletion hooks/useIntersectionObserver.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function useIntersectionObserver<T>({
rootMargin = '0px',
threshold = 1.0,
target,
enabled = true,
enabled = false,
onIntersect,
}: IUseIntersectionObserverProps<T>) {
useEffect(() => {
Expand Down

0 comments on commit c6bc185

Please sign in to comment.