diff --git a/src/components/admin/YouTubeAnalyticsDashboard.tsx b/src/components/admin/YouTubeAnalyticsDashboard.tsx index 003addf..33ca489 100644 --- a/src/components/admin/YouTubeAnalyticsDashboard.tsx +++ b/src/components/admin/YouTubeAnalyticsDashboard.tsx @@ -272,7 +272,7 @@ export const YouTubeAnalyticsDashboard: React.FC = () => { const renderPerformance = () => { const perfData = data as PerformanceData - if (!perfData) return null + if (!perfData?.stats) return null return ( <> @@ -435,7 +435,7 @@ export const YouTubeAnalyticsDashboard: React.FC = () => { const renderPipeline = () => { const pipeData = data as PipelineData - if (!pipeData) return null + if (!pipeData?.pipeline) return null // Group statuses for pipeline bar const statusGroups: Record = { @@ -557,7 +557,7 @@ export const YouTubeAnalyticsDashboard: React.FC = () => { const renderGoals = () => { const goalsData = data as GoalsData - if (!goalsData) return null + if (!goalsData?.stats) return null return ( <> @@ -652,7 +652,7 @@ export const YouTubeAnalyticsDashboard: React.FC = () => { const renderCommunity = () => { const commData = data as CommunityData - if (!commData) return null + if (!commData?.stats) return null const sentimentMax = Math.max(...Object.values(commData.sentiment)) @@ -765,7 +765,7 @@ export const YouTubeAnalyticsDashboard: React.FC = () => { > {channels.map((ch) => ( - ))} @@ -807,7 +807,12 @@ export const YouTubeAnalyticsDashboard: React.FC = () => {