diff --git a/app.js b/app.js index 9d7f031..c868f60 100644 --- a/app.js +++ b/app.js @@ -1402,7 +1402,6 @@ async function loadAffiliateLinks() { function renderAffiliateLinks(data) { const body = document.getElementById("affiliate-links-body"); if (!body) return; - // data is either { areas: [...] } or [{ areas: [...] }] or { data: [...] } let areas = []; if (data && Array.isArray(data.areas)) { areas = data.areas; @@ -1413,32 +1412,73 @@ function renderAffiliateLinks(data) { const first = data[0]; if (first && Array.isArray(first.areas)) areas = first.areas; } - const filtered = areas.filter((a) => a.text && a.link); - if (!filtered.length) { - body.innerHTML = - '
No affiliate links available yet.
'; - return; - } + body.innerHTML = ` -