remove monitor from hook
This commit is contained in:
1 parent
85a428dd92
commit
6db850dd4d
1 file changed
+1
-3
@@ -5,12 +5,10 @@ import { createToast } from "../Utils/toastUtils";
|
||||
const usePauseMonitor = ({ monitorId, triggerUpdate }) => {
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [error, setError] = useState(undefined);
|
||||
const [monitor, setMonitor] = useState(undefined);
|
||||
const pauseMonitor = async () => {
|
||||
try {
|
||||
setIsLoading(false);
|
||||
setIsLoading(true);
|
||||
const res = await networkService.pauseMonitorById({ monitorId });
|
||||
setMonitor(res.data.data);
|
||||
createToast({
|
||||
body: res.data.data.isActive
|
||||
? "Monitor resumed successfully"
|
||||
|
||||
Reference in new issue
Block a user