import { useMutation, useQueryClient } from "@tanstack/react-query"; import OpenHands from "#/api/open-hands"; export const useDeleteConversation = () => { const queryClient = useQueryClient(); return useMutation({ mutationFn: (variables: { conversationId: string }) => OpenHands.deleteUserConversation(variables.conversationId), onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["user", "conversations"] }); }, }); };