Spaces:
Configuration error
Configuration error
Download src/components/hooks/queries/useSessionData.ts from SreejithSHR/umami: direct link, hf CLI and curl.
- Browser
- Download file 353 Bytes
-
https://huggingface.co/spaces/SreejithSHR/umami/resolve/main/src/components/hooks/queries/useSessionData.ts
- Command line
-
hf download hf://spaces/SreejithSHR/umami/src/components/hooks/queries/useSessionData.ts
-
curl -L -o useSessionData.ts https://huggingface.co/spaces/SreejithSHR/umami/resolve/main/src/components/hooks/queries/useSessionData.ts
353 Bytes
| import { useApi } from '../useApi'; | |
| export function useSessionData(websiteId: string, sessionId: string) { | |
| const { get, useQuery } = useApi(); | |
| return useQuery({ | |
| queryKey: ['session:data', { websiteId, sessionId }], | |
| queryFn: () => { | |
| return get(`/websites/${websiteId}/sessions/${sessionId}/properties`, { websiteId }); | |
| }, | |
| }); | |
| } | |