Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix: refresh status freshness when returning to a tab

Richie McIlroy2ff2af0b7473
diff --git a/apps/status/components/status-page.tsx b/apps/status/components/status-page.tsx
index a12af4be3..c52773c46 100644
--- a/apps/status/components/status-page.tsx
+++ b/apps/status/components/status-page.tsx
@@ -52,7 +52,9 @@ export function StatusPage() {
let inFlight = false;
let controller: AbortController | null = null;
async function refresh() {
- if (inFlight || document.hidden) return;
+ if (document.hidden) return;
+ setNow(Date.now());
+ if (inFlight) return;
inFlight = true;
controller = new AbortController();
const timeout = setTimeout(() => controller?.abort(), 10_000);