More refreshing and status history displays

This commit is contained in:
Owen
2026-04-17 17:18:15 -07:00
parent 74165aa1cc
commit 8214700eaa
10 changed files with 326 additions and 11 deletions

View File

@@ -54,13 +54,15 @@ export default function UptimeMiniBar({
const siteQuery = useQuery({
...orgQueries.siteStatusHistory({ siteId: siteId ?? 0, days }),
enabled: siteId != null,
meta: { api }
meta: { api },
staleTime: 5 * 60 * 1000
});
const hcQuery = useQuery({
...orgQueries.healthCheckStatusHistory({ orgId: orgId ?? "", healthCheckId: healthCheckId ?? 0, days }),
enabled: healthCheckId != null && siteId == null,
meta: { api }
meta: { api },
staleTime: 5 * 60 * 1000
});
const { data, isLoading } = siteId != null ? siteQuery : hcQuery;