import useSWR from "swr"; import { useTranslation } from "next-i18next"; import Widget from "../widget"; import Block from "../block"; import { formatProxyUrl } from "utils/api-helpers"; export default function Jackett({ service }) { const { t } = useTranslation(); const config = service.widget; const { data: indexersData, error: indexersError } = useSWR(formatProxyUrl(config, "indexers")); if (indexersError) { return ; } if (!indexersData) { return ( ); } const errored = indexersData.filter((indexer) => indexer.last_error); return ( ); }