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

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

export function useAccessTokens() {
  return useQuery({
    queryKey: ['user', 'access-tokens'],
    queryFn: () => UserService.userListTokens({ limit: 50, offset: 0 }).then((r) => r.data),
    staleTime: 1000 * 60,
  });
}
