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

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

export function useOAuthAccounts() {
  return useQuery({
    queryKey: ['user', 'oauth'],
    queryFn: () => UserService.userListOAuthAccounts({}).then((r) => r.data),
    staleTime: 1000 * 60 * 5,
  });
}
