mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-15 03:08:44 +02:00
fix(analytics): reset auto-refresh when switching pages in selector
This commit is contained in:
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`],
|
||||
|
||||
Reference in new issue
Block a user