edits based on the comments
This commit is contained in:
1 parent
6e5d596e2f
commit
56ddb374d0
1 file changed
+3
-2
@@ -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);
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user