From b36147be7280359863e8e8a5499acb5b173d79c7 Mon Sep 17 00:00:00 2001 From: Karl Hudgell Date: Sun, 31 Dec 2023 16:24:29 +0000 Subject: [PATCH] pass linting --- src/widgets/romm/component.jsx | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/widgets/romm/component.jsx b/src/widgets/romm/component.jsx index 393d9e68..c84669d1 100644 --- a/src/widgets/romm/component.jsx +++ b/src/widgets/romm/component.jsx @@ -1,31 +1,27 @@ -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: statistics, error: statisticsStatsError } = useWidgetAPI(widget, "statistics"); + const { data: response, error: responseError } = useWidgetAPI(widget, "statistics"); - if (statisticsStatsError) { + if (responseError) { return ( - + ); } - if (statisticsStatsError) { - return ; + if (responseError) { + return ; } - if (statistics) { - const platforms = statistics.filter(x => x.n_roms!=0).length - const totalRoms = statistics.reduce((total, stat) => total + stat.n_roms, 0); + if (response) { + const platforms = response.filter(x => x.n_roms!==0).length + const totalRoms = response.reduce((total, stat) => total + stat.n_roms, 0); return (