Spaces:
Configuration error
Configuration error
Download src/components/hooks/queries/useWebsiteSessionStats.ts from SreejithSHR/umami: direct link, hf CLI and curl.
- Browser
- Download file 522 Bytes
-
https://huggingface.co/spaces/SreejithSHR/umami/resolve/main/src/components/hooks/queries/useWebsiteSessionStats.ts
- Command line
-
hf download hf://spaces/SreejithSHR/umami/src/components/hooks/queries/useWebsiteSessionStats.ts
-
curl -L -o useWebsiteSessionStats.ts https://huggingface.co/spaces/SreejithSHR/umami/resolve/main/src/components/hooks/queries/useWebsiteSessionStats.ts
522 Bytes
| import { useApi } from '../useApi'; | |
| import { useFilterParams } from '../useFilterParams'; | |
| export function useWebsiteSessionStats(websiteId: string, options?: { [key: string]: string }) { | |
| const { get, useQuery } = useApi(); | |
| const params = useFilterParams(websiteId); | |
| return useQuery({ | |
| queryKey: ['sessions:stats', { websiteId, ...params }], | |
| queryFn: () => get(`/websites/${websiteId}/sessions/stats`, { ...params }), | |
| enabled: !!websiteId, | |
| ...options, | |
| }); | |
| } | |
| export default useWebsiteSessionStats; | |