From 0c8e588bbb089d3cece985ceca4b097d38cb4184 Mon Sep 17 00:00:00 2001 From: Victor Bodinaud Date: Thu, 27 Feb 2025 15:16:25 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9BFix=20reward?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 2740982..fcfbabb 100644 --- a/public/index.html +++ b/public/index.html @@ -564,6 +564,22 @@ 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 items = contributor.latest_project_order.items; + + items.forEach(item => { + if (item.reward && + item.reward.title && + item.reward.title.fr) { + rewardName += item.reward.title.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 +590,7 @@ ${contributor.name}
${contributor.name || 'Contributeur anonyme'}
- ${contributor.reward ? `
${contributor.reward}
` : ''} + ${rewardName ? `
${rewardName}
` : ''} ${contributor.location ? `
${contributor.location}
` : ''} ${dateStr ? `
Depuis le ${dateStr}
` : ''}