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)) {
|
if (pauseUptimeMonitor.fulfilled.match(action)) {
|
||||||
updateCallback();
|
updateCallback();
|
||||||
//window.location.reload();
|
//window.location.reload();
|
||||||
if (monitor?.isActive){
|
if (action.payload?.isActive === false){
|
||||||
createToast({ body: "Monitor paused successfully." });
|
createToast({ body: "Monitor paused successfully." });
|
||||||
}else{
|
}else{
|
||||||
createToast({ body: "Monitor resume successfully." });
|
createToast({ body: "Monitor resumed successfully." });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new Error(action.error.message);
|
throw new Error(action.error.message);
|
||||||
@@ -277,6 +277,7 @@ ActionsMenu.propTypes = {
|
|||||||
_id: PropTypes.string,
|
_id: PropTypes.string,
|
||||||
url: PropTypes.string,
|
url: PropTypes.string,
|
||||||
type: PropTypes.string,
|
type: PropTypes.string,
|
||||||
|
isActive: PropTypes.bool,
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
isAdmin: PropTypes.bool,
|
isAdmin: PropTypes.bool,
|
||||||
updateCallback: PropTypes.func,
|
updateCallback: PropTypes.func,
|
||||||
|
|||||||
Reference in new issue
Block a user