From b4b11e85c46a3420ce9667988443fd85ce2e3778 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 19 Jan 2024 23:34:52 -0800 Subject: [PATCH] Lint --- src/widgets/romm/component.jsx | 32 ++++++++++++++++---------------- src/widgets/romm/widget.js | 12 ++++++------ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/widgets/romm/component.jsx b/src/widgets/romm/component.jsx index 6f4ce446..1cb3033e 100644 --- a/src/widgets/romm/component.jsx +++ b/src/widgets/romm/component.jsx @@ -3,30 +3,30 @@ import Block from "components/services/widget/block"; import useWidgetAPI from "utils/proxy/use-widget-api"; export default function Component({ service }) { -const { widget } = service; + const { widget } = service; -const { data: response, error: responseError } = useWidgetAPI(widget, "statistics"); + const { data: response, error: responseError } = useWidgetAPI(widget, "statistics"); -if (responseError) { + if (responseError) { return ( - - - + + + ); -} + } -if (responseError) { + if (responseError) { return ; -} + } -if (response) { - const platforms = response.filter(x => x.rom_count !== 0).length + if (response) { + const platforms = response.filter((x) => x.rom_count !== 0).length; const totalRoms = response.reduce((total, stat) => total + stat.rom_count, 0); return ( - - - - + + + + ); -} + } } diff --git a/src/widgets/romm/widget.js b/src/widgets/romm/widget.js index 17049cd9..a7bb60fd 100644 --- a/src/widgets/romm/widget.js +++ b/src/widgets/romm/widget.js @@ -1,14 +1,14 @@ import genericProxyHandler from "utils/proxy/handlers/generic"; const widget = { -api: "{url}/api/{endpoint}", -proxyHandler: genericProxyHandler, + api: "{url}/api/{endpoint}", + proxyHandler: genericProxyHandler, -mappings: { + mappings: { statistics: { - endpoint: "platforms", - } -}, + endpoint: "platforms", + }, + }, }; export default widget;