import { useQuery } from '@tanstack/react-query';

import { UserService } from '@/client/services/UserService';

export function useGpgKeys() {
  return useQuery({
    queryKey: ['user', 'gpg-keys'],
    queryFn: () => UserService.userListGpgKeys({}).then((r) => r.data),
    staleTime: 1000 * 60 * 2,
  });
}
