Skip to content

Commit de0b06e

Browse files
fix(Healthcheck): enable update button in modal to fetch data
1 parent 32f1a8d commit de0b06e

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/containers/Tenant/Diagnostics/Healthcheck/Healthcheck.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,18 @@ export const Healthcheck = (props: HealthcheckProps) => {
3232
const {autorefresh} = useSelector((state: any) => state.schema);
3333

3434
const fetchHealthcheck = useCallback(() => {
35-
if (fetchData) {
36-
dispatch(getHealthcheckInfo(tenant));
37-
}
38-
}, [dispatch, fetchData, tenant]);
39-
40-
useAutofetcher(fetchHealthcheck, [fetchHealthcheck], autorefresh);
35+
dispatch(getHealthcheckInfo(tenant));
36+
}, [dispatch, tenant]);
37+
38+
useAutofetcher(
39+
() => {
40+
if (fetchData) {
41+
fetchHealthcheck();
42+
}
43+
},
44+
[fetchData, fetchHealthcheck],
45+
autorefresh,
46+
);
4147

4248
const renderContent = () => {
4349
if (error) {

0 commit comments

Comments
 (0)