The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { pullRequestChecksRefreshIntervalMs } from "@t3tools/client-runtime/pull-request-checks"; |
| 2 | import type { PullRequestCheck } from "@t3tools/contracts"; |
| 3 | |
| 4 | import { useLiveRefresh } from "./useLiveRefresh"; |
| 5 | |
| 6 | export function usePullRequestChecksRefresh(input: { |
| 7 | refresh: (() => void) | null; |
| 8 | enabled: boolean; |
| 9 | key: string; |
| 10 | checks: ReadonlyArray<PullRequestCheck>; |
| 11 | }) { |
| 12 | useLiveRefresh(input.refresh, { |
| 13 | key: input.key, |
| 14 | enabled: input.enabled, |
| 15 | intervalMs: pullRequestChecksRefreshIntervalMs(input.checks), |
| 16 | }); |
| 17 | } |