From 56ddb374d00ff1399b686742dc9db8852a079c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivana=20=C5=A0tef=C3=A1nikov=C3=A1=C3=A1=C5=A0=C3=A1?= Date: Sat, 12 Oct 2024 10:51:15 +0200 Subject: [PATCH] edits based on the comments --- Client/src/Pages/Monitors/Home/actionsMenu.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Client/src/Pages/Monitors/Home/actionsMenu.jsx b/Client/src/Pages/Monitors/Home/actionsMenu.jsx index 315f850f4..db57f44df 100644 --- a/Client/src/Pages/Monitors/Home/actionsMenu.jsx +++ b/Client/src/Pages/Monitors/Home/actionsMenu.jsx @@ -55,10 +55,10 @@ const ActionsMenu = ({ monitor, isAdmin, updateCallback }) => { if (pauseUptimeMonitor.fulfilled.match(action)) { updateCallback(); //window.location.reload(); - if (monitor?.isActive){ + if (action.payload?.isActive === false){ createToast({ body: "Monitor paused successfully." }); }else{ - createToast({ body: "Monitor resume successfully." }); + createToast({ body: "Monitor resumed successfully." }); } } else { throw new Error(action.error.message); @@ -277,6 +277,7 @@ ActionsMenu.propTypes = { _id: PropTypes.string, url: PropTypes.string, type: PropTypes.string, + isActive: PropTypes.bool, }).isRequired, isAdmin: PropTypes.bool, updateCallback: PropTypes.func,