обновОЧКИ
This commit is contained in:
@@ -16,15 +16,7 @@ export function qChatMessages() {
|
||||
const response = await api.chad.chatMessages({ cursor: pageParam, limit: 25 })
|
||||
|
||||
return response.data
|
||||
// return {
|
||||
// messages: response.data.messages.reverse(),
|
||||
// nextCursor: response.data.nextCursor,
|
||||
// }
|
||||
},
|
||||
// select: data => ({
|
||||
// pages: [...data.pages].reverse(),
|
||||
// pageParams: [...data.pageParams].reverse(),
|
||||
// }),
|
||||
select: (data) => {
|
||||
return data.pages.flatMap(page => page.messages).toReversed()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user