import { useQuery } from "@tanstack/react-query";
import { apiClient } from "@/api/client";

export function useNetworks() {
  return useQuery({
    queryKey: ["networks"],
    queryFn: () => apiClient.listNetworks(),
  });
}
