footer widgets and tuomation page fixes

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-12 02:26:25 +00:00
parent 90b9d6aadc
commit 95d8ade942
3 changed files with 75 additions and 22 deletions

View File

@@ -146,9 +146,6 @@ export function useWorkflowStats(timeFilter: TimeFilter = 'all') {
return;
}
// Debug logging
console.log('[useWorkflowStats] Loading stats with timeFilter:', timeFilter, 'siteId:', activeSite.id);
setStats(prev => ({ ...prev, loading: true, error: null }));
try {
@@ -156,8 +153,6 @@ export function useWorkflowStats(timeFilter: TimeFilter = 'all') {
const dateFilter = getDateFilter(timeFilter);
const dateParam = dateFilter ? `&created_at__gte=${dateFilter.split('T')[0]}` : '';
console.log("[useWorkflowStats] Date filter:", { timeFilter, dateFilter, dateParam });
// IMPORTANT: Widget should always show site-wide stats for consistency
// Sector filtering removed to ensure widget shows same counts on all pages
const siteParam = `&site_id=${activeSite.id}`;
@@ -249,7 +244,6 @@ export function useWorkflowStats(timeFilter: TimeFilter = 'all') {
const plannerTotal = clusteringCredits + ideaCredits;
const writerTotal = contentCredits + imageCredits;
console.log("[useWorkflowStats] Results:", { keywordsCount: keywordsRes?.count, clustersCount: clustersRes?.count });
setStats({
planner: {
totalKeywords: keywordsRes?.count || 0,