import useSWR from "swr"; import { BiError } from "react-icons/bi"; import { useTranslation } from "next-i18next"; import Node from "./node"; export default function Longhorn({ options }) { const { expanded, total, labels, include, nodes } = options; const { t } = useTranslation(); const { data, error } = useSWR(`/api/widgets/longhorn`, { refreshInterval: 1500 }); if (error || data?.error) { return (