From cb2b02e747567097ae072b5f90f91d36b932e3e4 Mon Sep 17 00:00:00 2001
From: adrien <adrien@malingrey.fr>
Date: Thu, 20 Jul 2023 02:40:03 +0200
Subject: [PATCH] regen

---
 index.html | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/index.html b/index.html
index 982a1b2..7759def 100644
--- a/index.html
+++ b/index.html
@@ -240,7 +240,6 @@
                 .then(response => response.json())
                 .then(json => {
                     noms = json
-                    
                     regen()
                 })
 
@@ -252,11 +251,11 @@
 
             function regen() {
                 if (sigleInput.value.length) {
-                    let listNoms = Array.from(sigleInput.value).map((lettre, position) => trouveMot(lettre, position))
+                    let suggestion= Array.from(sigleInput.value).map((lettre, position) => trouveMot(lettre, position)).join(" ")
                     alertDiv.innerHTML = `
                                                         <div class="fr-alert fr-alert--info">
                                                             <p>Suggestion :</p>
-                                                            <h3 class="fr-alert__title" id="nomDiv">${listNoms.join(" ")}</h3>
+                                                            <h3 class="fr-alert__title" id="nomDiv">${suggestion}</h3>
                                                             <button class="fr-btn--close fr-btn" title="Masquer le message" onclick="const alert = this.parentNode; alert.parentNode.removeChild(alert)">
                                                                 Masquer le message
                                                             </button>