diff --git a/frontend/profile.html b/frontend/profile.html index e059ed6..6ebdac3 100644 --- a/frontend/profile.html +++ b/frontend/profile.html @@ -2013,9 +2013,14 @@ const section = document.getElementById('lb-section'); const list = document.getElementById('lb-list'); if (!section || !list) return; + section.style.display = ''; // карточка видна всегда try { const data = await LS.api('/api/gamification/leaderboard?period=' + encodeURIComponent(_lbPeriod)); - if (!data || !data.length) { section.style.display = 'none'; return; } + if (!data || !data.length) { + list.innerHTML = '
Пока нет данных рейтинга. Проходи тесты и набирай XP!
'; + if (window.lucide) lucide.createIcons(); + return; + } list.innerHTML = data.map((u, i) => { const rank = i + 1; const medal = rank === 1 ? '#FFD700' : rank === 2 ? '#C0C0C0' : rank === 3 ? '#CD7F32' : 'transparent';