feat(dashboard): close legacy parity gaps
This commit is contained in:
1 parent
92287c0a9a
commit
4b3f00729f
21 files changed
+397
-28
No files matched your search
@@ -4,6 +4,7 @@ import { conversationApi } from './conversation-api.js';
|
||||
export const conversationQueryKeys = {
|
||||
all: ['conversations'] as const,
|
||||
detail: (id: string) => ['conversations', 'detail', id] as const,
|
||||
processedPosts: (username: string) => ['conversations', 'processed-posts', username] as const,
|
||||
};
|
||||
|
||||
export function useConversationsQuery() {
|
||||
@@ -22,6 +23,18 @@ export function useSuggestReplyMutation(id: string) {
|
||||
return useMutation({ mutationFn: () => conversationApi.suggestReply(id) });
|
||||
}
|
||||
|
||||
export function useSuggestMediaAskMutation(id: string) {
|
||||
return useMutation({ mutationFn: () => conversationApi.suggestMediaAsk(id) });
|
||||
}
|
||||
|
||||
export function useProcessedPostsQuery(username: string) {
|
||||
return useQuery({
|
||||
queryKey: conversationQueryKeys.processedPosts(username),
|
||||
queryFn: () => conversationApi.processedPosts(username),
|
||||
enabled: username.length > 0,
|
||||
});
|
||||
}
|
||||
|
||||
export function useSendReplyMutation(id: string) {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
|
||||
Reference in new issue
Block a user