'use client'; import { Loader2, FileWarning } from 'lucide-react'; import { useReviewIQAnalytics } from '@/hooks/useReviewIQAnalytics'; import { AnalystReport } from './AnalystReport'; import { BusinessReport } from './BusinessReport'; import { isSynthesisV2 } from './types'; import type { ReviewIQFilters, LegacySynthesis, SynthesisV2 } from './types'; interface ReportTabProps { jobId?: string; businessId?: string; } // Default filters for Report view - uses 'all' time range for comprehensive analysis const defaultFilters: ReviewIQFilters = { timeRange: 'all', sentiment: [], urtDomain: null, intensity: [], brushRange: null, }; /** * Report Tab - Wraps report components with data fetching. * Automatically detects report version and renders appropriate component. */ export function ReportTab({ jobId, businessId }: ReportTabProps) { const { data, loading, error } = useReviewIQAnalytics({ jobId, businessId, filters: defaultFilters, }); // Loading state if (loading) { return (
{error}
No data available for this report.
The AI-powered analyst report hasn't been generated for this dataset. Run the pipeline with the "synthesize" stage to generate the report.