mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-04-25 18:40:59 -05:00
Merge pull request #1383 from bluewave-labs/fix/fe/monitor-pause-toast
fix: add pause toast to PageSpeed and Uptime configure pages, resolves #1380
This commit is contained in:
@@ -135,6 +135,8 @@ const PageSpeedConfigure = () => {
|
||||
if (pausePageSpeed.fulfilled.match(action)) {
|
||||
const monitor = action.payload.data;
|
||||
setMonitor(monitor);
|
||||
const state = action?.payload?.data.isActive === false ? "paused" : "resumed";
|
||||
createToast({ body: `Monitor ${state} successfully.` });
|
||||
} else if (pausePageSpeed.rejected.match(action)) {
|
||||
throw new Error(action.error.message);
|
||||
}
|
||||
|
||||
@@ -141,6 +141,8 @@ const Configure = () => {
|
||||
if (pauseUptimeMonitor.fulfilled.match(action)) {
|
||||
const monitor = action.payload.data;
|
||||
setMonitor(monitor);
|
||||
const state = action?.payload?.data.isActive === false ? "paused" : "resumed";
|
||||
createToast({ body: `Monitor ${state} successfully.` });
|
||||
} else if (pauseUptimeMonitor.rejected.match(action)) {
|
||||
throw new Error(action.error.message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user