fix(analytics): reset auto-refresh when switching pages in selector

This commit is contained in:
Michael committed 2026-02-12 10:54:27 +01:00
1 parent 330c42c6ff
commit a460255b93
1 file changed
+5
@@ -31,6 +31,11 @@ export function AnalyticsDashboard() {
}
}, [pages, selectedPageId]);
// Reset auto-refresh flag when switching pages
useEffect(() => {
autoRefreshDone.current = false;
}, [selectedPageId]);
// Fetch History for selected page (with polling every 30s)
const { data: history = [], isLoading: isLoadingHistory } = useQuery<any[]>({
queryKey: [`/api/analytics/pages/${selectedPageId}/history`],