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;