mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-24 22:03:21 +03:00
ignoring load more if last page is still fetching
This commit is contained in:
parent
5a86603b44
commit
b29cb8bbe1
@ -52,7 +52,13 @@ export const useNotificationsQuery = (filter: NotificationFilters) => {
|
||||
};
|
||||
|
||||
const _fetchNextPage = () => {
|
||||
const lastId = _getNextPageParam(notificationQueries.lastItem.data);
|
||||
const lastPage = notificationQueries.lastItem;
|
||||
|
||||
if (!lastPage || lastPage.isFetching) {
|
||||
return;
|
||||
}
|
||||
|
||||
const lastId = _getNextPageParam(lastPage.data);
|
||||
if (!pageParams.includes(lastId)) {
|
||||
pageParams.push(lastId);
|
||||
setPageParams([...pageParams]);
|
||||
|
Loading…
Reference in New Issue
Block a user