Sanitized mirror from private repository - 2026-04-06 03:24:03 UTC
Some checks failed
Documentation / Build Docusaurus (push) Failing after 4m58s
Documentation / Deploy to GitHub Pages (push) Has been skipped

This commit is contained in:
Gitea Mirror Bot
2026-04-06 03:24:03 +00:00
commit 5703a6e15e
1415 changed files with 359330 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,
});
}