Open History to see the last commit
1import { pullRequestChecksRefreshIntervalMs } from "@t3tools/client-runtime/pull-request-checks";
2import type { PullRequestCheck } from "@t3tools/contracts";
3
4import { useLiveRefresh } from "./useLiveRefresh";
5
6export 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}