diff --git a/frontend/src/pages/Dashboard/Home.tsx b/frontend/src/pages/Dashboard/Home.tsx index 2a3e1b63..38307c75 100644 --- a/frontend/src/pages/Dashboard/Home.tsx +++ b/frontend/src/pages/Dashboard/Home.tsx @@ -1,4 +1,4 @@ -import { useEffect, useState } from "react"; +import React, { useEffect, useState } from "react"; import { Link } from "react-router"; import PageMeta from "../../components/common/PageMeta"; import CreditBalanceWidget from "../../components/dashboard/CreditBalanceWidget"; @@ -134,14 +134,15 @@ export default function Home() { try { setLoading(true); - // Fetch all data in parallel (without site/sector filters for app-wide view) + // Fetch account-level data (all sites in account) - no site/sector filters + // This shows aggregated data across all sites for account-wide insights const [keywordsRes, clustersRes, ideasRes, tasksRes, contentRes, imagesRes] = await Promise.all([ - fetchKeywords({ page_size: 1 }), // Just get count - fetchClusters({ page_size: 1 }), - fetchContentIdeas({ page_size: 1 }), - fetchTasks({ page_size: 1 }), - fetchContent({ page_size: 1 }), - fetchContentImages({ page_size: 1 }) + fetchKeywords({ page_size: 1, site_id: undefined }), // Account-level: all sites + fetchClusters({ page_size: 1, site_id: undefined }), + fetchContentIdeas({ page_size: 1, site_id: undefined }), + fetchTasks({ page_size: 1, site_id: undefined }), + fetchContent({ page_size: 1, site_id: undefined }), + fetchContentImages({ page_size: 1, site_id: undefined }) ]); const totalKeywords = keywordsRes.count || 0; @@ -232,9 +233,14 @@ export default function Home() { {/* App-Wide Insights */}
-

- App-Wide Insights -

+
+

+ Account-Wide Insights +

+ + All sites aggregated + +
{loading ? (
{[1, 2, 3, 4].map((i) => ( @@ -289,8 +295,10 @@ export default function Home() {
-
- {step.icon} +
+ {React.cloneElement(step.icon as React.ReactElement, { + className: 'w-8 h-8 flex-shrink-0' + })}