This commit is contained in:
ponzischeme89
2026-08-24 22:56:46 +12:00
parent 4f95767e2f
commit 396d35e2f5
48 changed files with 1541 additions and 672 deletions
+3
View File
@@ -1,5 +1,6 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { api } from '../api/client';
import { subscribeToRecovery } from './availability';
/* The two hooks every page is built from.
*
@@ -77,6 +78,8 @@ export function useQuery<T>(path: string, options: QueryOptions = {}): Loadable<
};
}, [run]);
useEffect(() => subscribeToRecovery(() => void run()), [run]);
useEffect(() => {
if (!pollMs || !enabled) return;
let timer: number | undefined;