File size: 404 Bytes
246d201 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import { useQuery } from "@tanstack/react-query";
import OpenHands from "#/api/open-hands";
import { useIsAuthed } from "./use-is-authed";
export const useUserConversations = () => {
const { data: userIsAuthenticated } = useIsAuthed();
return useQuery({
queryKey: ["user", "conversations"],
queryFn: OpenHands.getUserConversations,
enabled: !!userIsAuthenticated,
});
};
|