{patternAnalysis.articles.slice(0, 5).map((article, index) => {
// Format the date from the article
let formattedDate = 'N/A';
if (article.date) {
try {
// Parse the date string - it could be in various formats
const date = new Date(article.date);
// If the date parsing failed, try to extract date from the link if it's in the format needed
if (isNaN(date.getTime())) {
// Handle different date formats if needed
// Try to extract from the link or other format
formattedDate = 'N/A';
} else {
// Format date as "09/oct/25" (day/mon/yy)
const day = date.getDate().toString().padStart(2, '0');
const month = date.toLocaleString('default', { month: 'short' }).toLowerCase();
const year = date.getFullYear().toString().slice(-2);
formattedDate = `${day}/${month}/${year}`;
}
} catch (e) {
formattedDate = 'N/A';
}
}
return (