File size: 444 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
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,
} );
|