From 641386fe91f9efc646a8468c4655ce9203684707 Mon Sep 17 00:00:00 2001 From: "Mariana R. Santos" Date: Mon, 13 Nov 2023 11:12:29 +0100 Subject: [PATCH] Fix switching of the stop all robots button --- .../components/Pages/FrontPage/RobotCards/RobotStatusView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Pages/FrontPage/RobotCards/RobotStatusView.tsx b/frontend/src/components/Pages/FrontPage/RobotCards/RobotStatusView.tsx index c65fb2679..c00dcfa3e 100644 --- a/frontend/src/components/Pages/FrontPage/RobotCards/RobotStatusView.tsx +++ b/frontend/src/components/Pages/FrontPage/RobotCards/RobotStatusView.tsx @@ -40,13 +40,13 @@ export function RobotStatusSection() { ) setRobots(relevantRobots) - const missionQueueFozenStatus = enabledRobots + const missionQueueFozenStatus = relevantRobots .map((robot: Robot) => { return robot.missionQueueFrozen }) .filter((status) => status === true) - if (missionQueueFozenStatus.length > 0 && !safeZoneStatus) switchSafeZoneStatus(true) + if (missionQueueFozenStatus.length > 0) switchSafeZoneStatus(true) else switchSafeZoneStatus(false) }, [enabledRobots, installationCode])