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

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

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