diff --git a/app/admin/(protected)/page.js b/app/admin/(protected)/page.js index a98aca1..78cd6d9 100644 --- a/app/admin/(protected)/page.js +++ b/app/admin/(protected)/page.js @@ -26,13 +26,15 @@ function StatCard({ label, value, icon: Icon, color = 'emerald' }) { export default async function AdminDashboard() { - const [articles, stats] = await Promise.allSettled([ + const [articles, stats, channelSummary] = await Promise.allSettled([ adminListArticles({ limit: 50 }), getStats(), + getChannelSummary(), ]); const arts = articles.status === 'fulfilled' ? (Array.isArray(articles.value) ? articles.value : articles.value?.articles || []) : []; const st = stats.status === 'fulfilled' ? stats.value : null; + const channelStats = channelSummary.status === 'fulfilled' ? channelSummary.value : null; const published = arts.filter(a => a.status === 'published').length; const drafts = arts.filter(a => a.status === 'draft').length;