From ec920a7bb7ed5ef28c09fa6f3d67e8acd331ffeb Mon Sep 17 00:00:00 2001 From: Karl Hudgell Date: Fri, 19 Jan 2024 12:07:40 +0000 Subject: [PATCH] formatting? --- src/widgets/romm/component.jsx | 48 +++++++++++++++++----------------- src/widgets/romm/widget.js | 14 +++++----- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/widgets/romm/component.jsx b/src/widgets/romm/component.jsx index edeb9cca..6f4ce446 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) { - return ( - - - - ); - } - - if (responseError) { - return ; - } - - if (response) { - const platforms = response.filter(x => x.rom_count !== 0).length - const totalRoms = response.reduce((total, stat) => total + stat.rom_count, 0); - return ( - - - - - ); - } +if (responseError) { + return ( + + + + ); +} + +if (responseError) { + return ; +} + +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 97c22a30..17049cd9 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: { - statistics: { - endpoint: "platforms", - } - }, +mappings: { + statistics: { + endpoint: "platforms", + } +}, }; export default widget;