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