import type { Metadata } from 'next'; import Link from 'next/link'; import { WorldMap } from '@/components/charts/world-map'; import { CountryChip } from '@/components/ui/badges'; import { Container, PageHeader, Unavailable } from '@/components/ui/section'; import { api, safe } from '@/lib/api'; import { cn } from '@/lib/cn'; import { fmtInt, fmtPctSigned, fmtScore, num } from '@/lib/format'; import { routes } from '@/lib/site'; export const metadata: Metadata = { title: 'Country atlas', description: 'Activity, hiring, expansion and industry mix of monitored companies by country.' }; export const revalidate = 300; export default async function CountriesPage() { const [data, map] = await Promise.all([safe(api.countries()), safe(api.map('events_30d'))]); return ( {map?.buckets.length ? : null} {!data ? ( ) : ( <>
{data.items.map((c) => { const h = num(c.hiring_momentum_30d); return ( ); })}
Country Region Companies Events 7 d Events 30 d Activity Hiring 30 d Industry mix
{c.name} {c.region ?? '—'} {fmtInt(c.companies)} {fmtInt(c.events_7d)} {fmtInt(c.events_30d)} {fmtScore(c.activity_score)} 0 ? 'text-positive' : h < 0 ? 'text-danger' : ''))}>{h === null ? '—' : fmtPctSigned(h)} {c.industry_mix.slice(0, 3).map((m) => `${m.industry.replace(/-/g, ' ')} ${m.companies}`).join(' · ')}
    {data.items.map((c) => (
  • {c.name}

    {fmtInt(c.companies)} companies · {fmtInt(c.events_30d)} events 30 d · activity {fmtScore(c.activity_score)} · hiring {fmtPctSigned(c.hiring_momentum_30d, 0)}

  • ))}
)}
); }