diff --git a/public/index.html b/public/index.html index 2740982..36dff74 100644 --- a/public/index.html +++ b/public/index.html @@ -564,6 +564,25 @@ dateStr = date.toLocaleDateString('fr-FR', { year: 'numeric', month: 'short', day: 'numeric' }); } + let rewardName = ''; + if (contributor.latest_project_order && + contributor.latest_project_order.items && + contributor.latest_project_order.items.length > 0) { + + const item = contributor.latest_project_order.items[0]; + + if (item.reward && item.reward.parent && item.reward.parent.title) { + rewardName = item.reward.parent.title.fr || + item.reward.parent.title.en || + Object.values(item.reward.parent.title)[0] || ''; + + // Ajouter la variante si elle existe + if (item.reward.description_fr) { + rewardName += ` (${item.reward.description_fr})`; + } + } + } + const avatarUrl = contributor.avatar || 'https://s3-eu-west-1.amazonaws.com/com.ulule.assets/site/build/img/avatars/avatar-blue.png'; html += ` @@ -574,7 +593,7 @@ ${contributor.name}
${contributor.name || 'Contributeur anonyme'}
- ${contributor.reward ? `
${contributor.reward}
` : ''} + ${rewardName ? `
${rewardName}
` : ''} ${contributor.location ? `
${contributor.location}
` : ''} ${dateStr ? `
Depuis le ${dateStr}
` : ''}