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