+ {transcripts.map((t) => {
+ const isExpanded = expandedIds.has(t.id);
+ // Formattare call_date come "12 giugno 2026"
+ // call_date è string "YYYY-MM-DD" — aggiungere T00:00:00 per evitare timezone shift
+ const formattedDate = format(
+ new Date(t.call_date + "T00:00:00"),
+ "d MMMM yyyy",
+ { locale: it }
+ );
+ // Anteprima: prime 3 righe o 200 caratteri (il primo valore raggiunto)
+ const preview = t.content
+ .split("\n")
+ .slice(0, 3)
+ .join("\n")
+ .slice(0, 200);
+ const hasMore = t.content.length > preview.length || t.content.split("\n").length > 3;
+
+ return (
+
+
+
+
+ {formattedDate}
+ {t.title && (
+ — {t.title}
+ )}
+
+
+ {isExpanded ? t.content : preview}
+ {!isExpanded && hasMore && (
+ ...
+ )}
+
+ {hasMore && (
+
+ )}
+
+
+
+
+ );
+ })}
+
+ ) : (
+