import { useTranslation } from "next-i18next"; import Container from "components/services/widget/container"; import Block from "components/services/widget/block"; import useWidgetAPI from "utils/proxy/use-widget-api"; export default function Component({ service }) { const { t } = useTranslation(); const { widget } = service; const { data: statsData, error: statsError } = useWidgetAPI(widget, "stats"); const { data: futureData, error: futureError } = useWidgetAPI(widget, "future"); if (statsError || futureError) { const finalError = statsError ?? futureError; return ; } if (!statsData || !futureData) { return ( ); } const { later, missed, soon, today } = futureData.data; const future = later.length + missed.length + soon.length + today.length; return ( ); }