import { ArrowDownRight, ArrowUpRight } from 'lucide-react'; import Link from 'next/link'; import { t } from '@/i18n'; import { cn } from '@/lib/cn'; import { formatValue, grouped } from '@/lib/format'; import { routes } from '@/lib/site'; import type { PulseItem, PulseResponse } from '@/lib/types-analytics'; /** * World Pulse: a dense editorial list of what is changing globally, one row per headline/featured indicator. * Direction uses the neutral increase/decrease colours (--inc/--dec); "improvement" tones apply only when the * indicator declares a direction. Share bar = countries up vs down; right column = biggest mover. */ export function WorldPulse({ data, limit = 14 }: { data: PulseResponse; limit?: number }) { const items = [...data.items].sort((a, b) => Math.max(b.share_up, b.share_down) - Math.max(a.share_up, a.share_down)).slice(0, limit); return (
{t('home.pulse.footnote', { year: data.year_reference, n: grouped(data.summary.n_countries_reporting) })} {t('semantics.note')}
{it.headline}