import type { ClientView } from '@/lib/client-view'; interface NotesSectionProps { notes: ClientView['notes']; } export function NotesSection({ notes }: NotesSectionProps) { if (notes.length === 0) { return (

Nessuna nota ancora registrata. Le decisioni appariranno qui man mano che il progetto avanza.

); } return (
{notes.map((note) => { const dateFormatted = new Date(note.created_at).toLocaleDateString('it-IT', { year: 'numeric', month: 'long', day: 'numeric', }); const timeFormatted = new Date(note.created_at).toLocaleTimeString('it-IT', { hour: '2-digit', minute: '2-digit', }); return (
{/* Testo nota — sola lettura (D-12: admin scrive, cliente legge) */}

{note.body}

{/* Timestamp */}

{dateFormatted} alle {timeFormatted}

); })}
); }