Fix join button label to show the resolved sponsor (was showing inviter)

The .inv-id-inline spans (join button + dApp-sponsor mention) were left on the
inviter's id; now they follow joinTarget like the header/href already did.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-08-16 13:05:43 -05:00
parent f0ea4469a4
commit cce3b060b3
+4 -1
View File
@@ -57,9 +57,12 @@
joinTargetId=t.id;
const jb=document.getElementById('joinBtn');
if(t.referralUrl)jb.href=t.referralUrl;
// the join CTA + "join under" header reflect the ACTUAL sponsor, not the inviter
// the join CTA + "join under" header + dApp-sponsor mentions reflect the
// ACTUAL sponsor the entry lands on, not the inviter (only the top
// "invited by #X" line keeps the inviter's id)
document.getElementById('invIdBtn').textContent='#'+t.id;
document.getElementById('invIdJoin').textContent='#'+t.id;
document.querySelectorAll('.inv-id-inline').forEach(el=>el.textContent='#'+t.id);
const note=document.getElementById('invQualNote');
if(t.reason==='leg'||t.reason==='global'){
note.innerHTML=`<div class="callout" style="margin-top:14px">You were invited by <strong>Member #${esc(d.id)}</strong>, who's already <strong>qualified</strong>. So your entry goes to <strong>Member #${esc(t.id)}</strong> — the next spot in the team that needs its 2 — and you'll join directly under them. Same team, filling the next open position in order (no spillover). Enter sponsor <strong>#${esc(t.id)}</strong> in the dApp.</div>`;