mirror of
https://github.com/warmbly/warmbly.git
synced 2026-11-17 16:19:13 +00:00
14 lines
467 B
TypeScript
14 lines
467 B
TypeScript
import { useQuery } from "@tanstack/react-query";
|
|
import getAccountStatus from "@/lib/api/client/app/analytics/getAccountStatus";
|
|
|
|
export default function useAccountStatus(id: string) {
|
|
return useQuery({
|
|
queryKey: ["analytics", "accounts", id],
|
|
queryFn: () => getAccountStatus(id),
|
|
enabled: !!id,
|
|
// Routine recovery persists without a realtime event.
|
|
refetchInterval: 60_000,
|
|
refetchOnWindowFocus: true,
|
|
});
|
|
}
|