fix pause state
This commit is contained in:
1 parent
eacbd34b35
commit
b342511aac
1 file changed
+1
-1
@@ -46,7 +46,7 @@ const ActionsMenu = ({
|
|||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
const action = await dispatch(pauseUptimeMonitor({ monitorId: monitor._id }));
|
const action = await dispatch(pauseUptimeMonitor({ monitorId: monitor._id }));
|
||||||
if (pauseUptimeMonitor.fulfilled.match(action)) {
|
if (pauseUptimeMonitor.fulfilled.match(action)) {
|
||||||
const state = action?.payload?.data.isActive === false ? "paused" : "resumed";
|
const state = action?.payload?.data.isActive === false ? "resumed" : "paused";
|
||||||
createToast({ body: `Monitor ${state} successfully.` });
|
createToast({ body: `Monitor ${state} successfully.` });
|
||||||
pauseCallback();
|
pauseCallback();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user