add update trigger
This commit is contained in:
1 parent
8a2d0d7724
commit
a8aeed341a
1 file changed
+2
-2
@@ -2,7 +2,7 @@ import { useEffect, useState } from "react";
|
|||||||
import { networkService } from "../main";
|
import { networkService } from "../main";
|
||||||
import { createToast } from "../Utils/toastUtils";
|
import { createToast } from "../Utils/toastUtils";
|
||||||
|
|
||||||
export const useFetchMonitorsWithSummary = ({ teamId, types }) => {
|
export const useFetchMonitorsWithSummary = ({ teamId, types, monitorUpdateTrigger }) => {
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const [monitors, setMonitors] = useState(undefined);
|
const [monitors, setMonitors] = useState(undefined);
|
||||||
const [monitorsSummary, setMonitorsSummary] = useState(undefined);
|
const [monitorsSummary, setMonitorsSummary] = useState(undefined);
|
||||||
@@ -30,7 +30,7 @@ export const useFetchMonitorsWithSummary = ({ teamId, types }) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
fetchMonitors();
|
fetchMonitors();
|
||||||
}, [teamId, types]);
|
}, [teamId, types, monitorUpdateTrigger]);
|
||||||
return [monitors, monitorsSummary, isLoading, networkError];
|
return [monitors, monitorsSummary, isLoading, networkError];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user