diff --git a/jam-ui/src/components/page/JKPeopleFilter.js b/jam-ui/src/components/page/JKPeopleFilter.js index b329c31e2..e5a81432d 100644 --- a/jam-ui/src/components/page/JKPeopleFilter.js +++ b/jam-ui/src/components/page/JKPeopleFilter.js @@ -171,13 +171,14 @@ function JKPeopleFilter() { params.current = { ...data, genres, joined_within_days, active_within_days }; try { - dispatch(loadPrefetched()); - currentPage.current = nextPage.current if(currentPage.current === 0 && nextPage.current === 0){ dispatch(fetchPeople({ data: params.current, page: nextPage.current, limit: perPageLimit })); }else{ + if(prefetched.length > 0){ + dispatch(loadPrefetched()); + } if(hasOffset){ dispatch(preFetchPeople({ data: params.current, page: nextPage.current, limit: perPageLimit })); } @@ -224,7 +225,7 @@ function JKPeopleFilter() { } } - }, [loadingStatus, hasOffset]) + }, [loadingStatus]) useEffect(() => { setShowLoadMore(prefetched.length > 0 || hasOffset)