From 0280efa74667c84b1556e65f3978310a496aa146 Mon Sep 17 00:00:00 2001 From: selankon Date: Mon, 11 Mar 2024 10:01:22 +0100 Subject: [PATCH] fix(landing): fix most_active_iface Fix #378 --- plugins/lime-plugin-rx/src/rxPage.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/lime-plugin-rx/src/rxPage.js b/plugins/lime-plugin-rx/src/rxPage.js index 40ea6857..da9b1bd0 100644 --- a/plugins/lime-plugin-rx/src/rxPage.js +++ b/plugins/lime-plugin-rx/src/rxPage.js @@ -65,13 +65,16 @@ const SystemBox = ({ uptime, firmwareVersion, boardModel }) => { }; const MostActiveBox = ({ node, changeNode }) => { + const use_most_active = + node.most_active?.station_mac || node.most_active?.length > 0; const { data: bathost } = useBatHost( - node.most_active && node.most_active.station_mac, - node.most_active && node.most_active.iface, + node.most_active?.station_mac, + node.most_active?.iface, { enabled: !!node.most_active } ); - if (node.most_active === undefined) { + if (!use_most_active) { + console.log("SPAN"); return ; }