From e87c057ccbf43ba28139f22466be56d425c8fc38 Mon Sep 17 00:00:00 2001 From: Vishnu Sreekumaran Nair <200557136@student.georgianc.on.ca> Date: Mon, 12 May 2025 12:40:53 -0400 Subject: [PATCH] switch conditional values for state variable --- client/src/Pages/PageSpeed/Configure/index.jsx | 2 +- client/src/Pages/Uptime/Configure/index.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/Pages/PageSpeed/Configure/index.jsx b/client/src/Pages/PageSpeed/Configure/index.jsx index d9753ef2c..b1d4ee11e 100644 --- a/client/src/Pages/PageSpeed/Configure/index.jsx +++ b/client/src/Pages/PageSpeed/Configure/index.jsx @@ -136,7 +136,7 @@ const PageSpeedConfigure = () => { if (pausePageSpeed.fulfilled.match(action)) { const monitor = action.payload.data; setMonitor(monitor); - const state = action?.payload?.data.isActive === false ? "paused" : "resumed"; + const state = action?.payload?.data.isActive === false ? "resumed" : "paused"; createToast({ body: `Monitor ${state} successfully.` }); } else if (pausePageSpeed.rejected.match(action)) { throw new Error(action.error.message); diff --git a/client/src/Pages/Uptime/Configure/index.jsx b/client/src/Pages/Uptime/Configure/index.jsx index 246f9cde1..87143fa8c 100644 --- a/client/src/Pages/Uptime/Configure/index.jsx +++ b/client/src/Pages/Uptime/Configure/index.jsx @@ -164,7 +164,7 @@ const Configure = () => { if (pauseUptimeMonitor.fulfilled.match(action)) { const monitor = action.payload.data; setMonitor(monitor); - const state = action?.payload?.data.isActive === false ? "paused" : "resumed"; + const state = action?.payload?.data.isActive === false ? "resumed" : "paused"; createToast({ body: `Monitor ${state} successfully.` }); } else if (pauseUptimeMonitor.rejected.match(action)) { throw new Error(action.error.message);