``` function useListUsersInfinite( options?: IListUserWithPagination & { page?: number }, params?: UseInfiniteQueryOptions<IPaginate<User>> ) { return useInfiniteQuery({ queryKey: [QUERY_USERS_INFINITE, options], initialPageParam: 1, queryFn: ({ pageParam }) => { return listUserWithPagination({ ...options, page: pageParam as number, }); }, getNextPageParam: (lastPage) => { const { currentPage, totalPages } = lastPage.meta; return currentPage < totalPages ? currentPage + 1 : undefined; }, ...params, }); } ```