Updated
This commit is contained in:
@@ -76,10 +76,9 @@ const useCreateChatMessage = (queryClient: QueryClient) => {
|
||||
onSuccess: (response) => {
|
||||
queryClient.setQueryData<InfiniteData<ApiPaginated<Chat>>>(
|
||||
[QUERY_KEYS.chat],
|
||||
(oldData) => {
|
||||
(oldData : any) => {
|
||||
if (oldData) {
|
||||
const lastPage =
|
||||
oldData!.pages[oldData!.pages.length - 1];
|
||||
const lastPage = oldData!.pages[oldData!.pages.length - 1];
|
||||
|
||||
return {
|
||||
pages: [
|
||||
|
||||
Reference in New Issue
Block a user