Sanitized mirror from private repository - 2026-04-05 11:58:57 UTC
Some checks failed
Documentation / Deploy to GitHub Pages (push) Has been cancelled
Documentation / Build Docusaurus (push) Has been cancelled

This commit is contained in:
Gitea Mirror Bot
2026-04-05 11:58:57 +00:00
commit 4622707153
1395 changed files with 358059 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
import useSWR from "swr";
import { fetchAPI } from "./api";
export function usePoll<T>(path: string, interval: number = 60000) {
return useSWR<T>(path, () => fetchAPI<T>(path), {
refreshInterval: interval,
revalidateOnFocus: false,
});
}