Skip to content

Commit

Permalink
Merge pull request #1383 from bluewave-labs/fix/fe/monitor-pause-toast
Browse files Browse the repository at this point in the history
fix: add pause toast to PageSpeed and Uptime configure pages, resolves #1380
  • Loading branch information
ajhollid authored Dec 17, 2024
2 parents f1b6e6f + 4b47d43 commit d2daf54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Client/src/Pages/PageSpeed/Configure/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 2 additions & 0 deletions Client/src/Pages/Uptime/Configure/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit d2daf54

Please sign in to comment.