import { CloudRain, Gauge, Sun } from 'lucide-react'; import { formatHour, formatPercent, formatTemperature, weatherCodeLabel, } from '../lib/formatters'; import type { HourPoint } from '../types'; interface Timeline12hProps { hours: HourPoint[]; } export function Timeline12h({ hours }: Timeline12hProps) { return (

Próximas 12 horas

Chuva, UV e ar por horário

{hours.map((hour) => (
{formatTemperature(hour.temperature)} {weatherCodeLabel(hour.weatherCode)}
{formatPercent(hour.precipitationProbability)}
{hour.uvIndex.toFixed(1)}
{hour.usAqi ? `AQI ${Math.round(hour.usAqi)}` : `PM2.5 ${hour.pm25.toFixed(0)}`}
))}
); }