diff --git a/src/app/(app)/thinking/page.tsx b/src/app/(app)/thinking/page.tsx index 0a849979f3..7a307ebce2 100644 --- a/src/app/(app)/thinking/page.tsx +++ b/src/app/(app)/thinking/page.tsx @@ -59,39 +59,41 @@ const PostBox = () => { const queryClient = useQueryClient() if (!isLogin) return null + const handleSend = () => { + apiClient.shorthand.proxy.post({ data: { content: value } }).then((res) => { + setValue('') + + queryClient.setQueryData< + InfiniteData< + RecentlyModel[] & { + comments: number + } + > + >(QUERY_KEY, (old) => { + return produce(old, (draft) => { + draft?.pages[0].unshift(res.$serialized as any) + return draft + }) + }) + }) + } return (