Download apps/web/src/hooks/useSystem.ts from hunian003/message: direct link, hf CLI and curl.
- Browser
- Download file 377 Bytes
-
https://huggingface.co/spaces/hunian003/message/resolve/main/apps/web/src/hooks/useSystem.ts
- Command line
-
hf download hf://spaces/hunian003/message/apps/web/src/hooks/useSystem.ts
-
curl -L -o useSystem.ts https://huggingface.co/spaces/hunian003/message/resolve/main/apps/web/src/hooks/useSystem.ts
377 Bytes
| /** | |
| * 系统状态相关 hooks | |
| */ | |
| import { useQuery } from '@tanstack/react-query'; | |
| import { systemApi } from '@api/system'; | |
| import { QUERY_STALE_TIME } from '@lib/constants'; | |
| /** | |
| * 获取系统状态 | |
| */ | |
| export function useSystemStatus() { | |
| return useQuery({ | |
| queryKey: ['system', 'status'], | |
| queryFn: systemApi.getStatus, | |
| staleTime: QUERY_STALE_TIME, | |
| }); | |
| } | |