import React from 'react'; import type { ScanHistoryResponse, WeeklyReportResponse, } from '../../service/visibility/visibility.interface'; import KPIRow from './KPIRow'; import { pulseNumbers } from './pulse-numbers'; import ScanHistoryChart from './ScanHistoryChart'; interface OverviewPulseProps { weeklyReport: WeeklyReportResponse | null; scanHistory: ScanHistoryResponse | null; weekIso: string; loading: boolean; } function OverviewPulse({ weeklyReport, scanHistory, weekIso, loading, }: OverviewPulseProps): JSX.Element { // Prompt counts live on the scan-history row, not the weekly report; a // week without its report reads the whole headline from the scan. const { score, shareOfVoice, point, scanWeek } = pulseNumbers( weeklyReport, scanHistory?.history ?? [], weekIso ); return (
); } export default OverviewPulse;