react-code-dataset / wp-calypso /packages /data-stores /src /queries /use-happiness-engineers-query.ts
react-code-dataset / wp-calypso /packages /data-stores /src /queries /use-happiness-engineers-query.ts
Download wp-calypso/packages/data-stores/src/queries/use-happiness-engineers-query.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 444 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/data-stores/src/queries/use-happiness-engineers-query.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/data-stores/src/queries/use-happiness-engineers-query.ts
-
curl -L -o use-happiness-engineers-query.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/data-stores/src/queries/use-happiness-engineers-query.ts
444 Bytes
| import { useQuery } from '@tanstack/react-query'; | |
| import wpcomRequest from 'wpcom-proxy-request'; | |
| export const useHappinessEngineersQuery = () => | |
| useQuery< | |
| { | |
| display_name: string; | |
| name: string; | |
| avatar_URL: string; | |
| }[] | |
| >( { | |
| queryKey: [ 'happinessEngineers' ], | |
| queryFn: async () => | |
| await wpcomRequest( { path: '/meta/happiness-engineers/', apiVersion: '1.1' } ), | |
| refetchOnWindowFocus: false, | |
| staleTime: Infinity, | |
| } ); | |