import React from 'react'; import { useQuery } from '@tanstack/react-query'; import { FileText, Rss, Users, Route, TrendingUp, Clock, CheckCircle } from 'lucide-react'; import { apiClient } from '../lib/api'; const Dashboard: React.FC = () => { const { data: stats, isLoading, error } = useQuery({ queryKey: ['dashboard-stats'], queryFn: () => apiClient.getDashboardStats(), }); if (isLoading) { return (
Failed to load dashboard data
Overview of your feed management system
Articles Today
{articleStats?.total_today || 0}
Articles This Week
{articleStats?.total_week || 0}
Approved Today
{articleStats?.approved_today || 0}
Approval Rate
{articleStats?.approval_percentage_today?.toFixed(1) || 0}%
Active Feeds
{systemStats?.active_feeds || 0} /{systemStats?.total_feeds || 0}
Platform Accounts
{systemStats?.active_platform_accounts || 0} /{systemStats?.total_platform_accounts || 0}
Platform Channels
{systemStats?.active_platform_channels || 0} /{systemStats?.total_platform_channels || 0}
Active Routes
{systemStats?.active_routes || 0} /{systemStats?.total_routes || 0}