Skip to content

Commit

Permalink
edits based on the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivana ŠtefánikovááŠá committed Oct 12, 2024
1 parent 6e5d596 commit 56ddb37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Client/src/Pages/Monitors/Home/actionsMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 56ddb37

Please sign in to comment.