From 1909fe4a4cfd0dff9b557fb408c2c47c42681bc3 Mon Sep 17 00:00:00 2001 From: Arnaud Bailly Date: Wed, 5 Nov 2025 08:04:32 +0100 Subject: fix color display for success/failure --- lambda-calcul/haskell/public/leaderboard.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lambda-calcul/haskell') diff --git a/lambda-calcul/haskell/public/leaderboard.js b/lambda-calcul/haskell/public/leaderboard.js index 15b5b42..7541701 100644 --- a/lambda-calcul/haskell/public/leaderboard.js +++ b/lambda-calcul/haskell/public/leaderboard.js @@ -14,12 +14,6 @@ const updateLeaderboard = () => { data.forEach((entry, index) => { const row = document.createElement('tr'); - if(entry.lastResult) { - row.classList.add('success'); - } else if (!entry.lastResult && entry.lastTest){ - row.classList.add('fail'); - } - const nameCell = document.createElement('td'); nameCell.textContent = entry.user; row.appendChild(nameCell); @@ -32,6 +26,12 @@ const updateLeaderboard = () => { timeCell.textContent = entry.lastTest; row.appendChild(timeCell); + if(entry.lastResult) { + timeCell.classList.add('success'); + } else if (!entry.lastResult && entry.lastTest){ + timeCell.classList.add('fail'); + } + tbody.appendChild(row); }); }) -- cgit v1.3.1