import type { CareLogDto } from "../server/queries"; const CARE_ICONS: Record = { watering: "💧", fertilizing: "ðŸŒą", repotting: "ðŸŠī", pruning: "✂ïļ", "pest-control": "🐛", other: "📋", }; function timeAgo(iso: string): string { const diff = Date.now() - new Date(iso).getTime(); const days = Math.floor(diff / (1000 * 60 * 60 * 24)); if (days === 0) return "Today"; if (days === 1) return "Yesterday"; return `${days} days ago`; } type Props = { logs: CareLogDto[]; }; export function CareHistoryList({ logs }: Props) { if (logs.length === 0) { return

No care events logged yet.

; } return ( ); }