mirror of
https://github.com/warmbly/warmbly.git
synced 2026-11-24 08:06:34 +00:00
13 lines
492 B
TypeScript
13 lines
492 B
TypeScript
import { useQuery } from "@tanstack/react-query";
|
|
import getGoogleConnection from "@/lib/api/client/app/leadsync/getGoogleConnection";
|
|
|
|
// Reports whether the org has a connected google_sheets OAuth connection
|
|
// usable for lead-sync. Drives the "Connect Google Sheets" vs sheet-picker UI.
|
|
export default function useGoogleConnection() {
|
|
return useQuery({
|
|
queryKey: ["lead-sync", "google", "connection"],
|
|
queryFn: getGoogleConnection,
|
|
staleTime: 10_000,
|
|
});
|
|
}
|