From c1a194fd840cf413f751d48c610c345a7e5b7aa3 Mon Sep 17 00:00:00 2001 From: Thorben Grove Date: Fri, 15 Dec 2023 15:49:58 +0100 Subject: [PATCH] hide minutes when empty --- src/widgets/fritzbox/component.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/widgets/fritzbox/component.jsx b/src/widgets/fritzbox/component.jsx index b1df3a7b..9a23836e 100644 --- a/src/widgets/fritzbox/component.jsx +++ b/src/widgets/fritzbox/component.jsx @@ -17,10 +17,12 @@ const formatUptime = (timestamp) => { if (days) { uptimeStr += `${days}d`; } - if (hours || days) { + if (days || hours) { uptimeStr += `${format(hours)}h`; } - uptimeStr += `${format(minutes)}m`; + if (days || hours || minutes) { + uptimeStr += `${format(minutes)}m`; + } if (!days) { uptimeStr += `${format(seconds)}s `; }