mirror of https://github.com/tooot-app/app
9 lines
330 B
TypeScript
9 lines
330 B
TypeScript
import { InstanceResponse } from '@api/instance'
|
|
|
|
export const infinitePageParams = {
|
|
getPreviousPageParam: (firstPage: InstanceResponse<any>) =>
|
|
firstPage.links?.prev && { min_id: firstPage.links.next },
|
|
getNextPageParam: (lastPage: InstanceResponse<any>) =>
|
|
lastPage.links?.next && { max_id: lastPage.links.next }
|
|
}
|