pl-fe: migrate status quotes list to tanstack query
Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
@ -11,7 +11,7 @@ const useStatusQuotes = (statusId: string) => {
|
||||
const { client } = usePlHooksApiClient();
|
||||
|
||||
return useInfiniteQuery({
|
||||
queryKey: ['statusesLists', 'quotes', statusId],
|
||||
queryKey: ['statusLists', 'quotes', statusId],
|
||||
queryFn: ({ pageParam }) => pageParam.next?.() || client.statuses.getStatusQuotes(statusId).then(minifyStatusList),
|
||||
initialPageParam: { previous: null, next: null, items: [], partial: false } as PaginatedResponse<string>,
|
||||
getNextPageParam: (page) => page.next ? page : undefined,
|
||||
|
||||
Reference in New Issue
Block a user