fix(web): satisfy dashboard lint checks
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 4m14s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 4m48s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped

refs #109
This commit is contained in:
2026-07-04 20:55:38 +02:00
parent a6056f73d8
commit 6a9f1e41a4
2 changed files with 9 additions and 7 deletions
+8 -5
View File
@@ -94,17 +94,20 @@ export function useDashboardHealthQuery(): DashboardHealthQueryState {
status: 'loading'
});
const refresh = useCallback(() => {
setState({ checks: null, error: null, status: 'loading' });
const loadHealth = useCallback(() => {
getDashboardHealth()
.then((checks) => setState({ checks, error: null, status: 'success' }))
.catch((error: unknown) => setState({ checks: null, error: messageFromError(error), status: 'error' }));
}, []);
const refresh = useCallback(() => {
setState({ checks: null, error: null, status: 'loading' });
loadHealth();
}, [loadHealth]);
useEffect(() => {
refresh();
}, [refresh]);
loadHealth();
}, [loadHealth]);
if (state.status === 'success') {
return { checks: state.checks, error: null, refresh, status: 'success' };