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:
+4
-1
@@ -57,9 +57,12 @@
|
|||||||
joinTargetId=t.id;
|
joinTargetId=t.id;
|
||||||
const jb=document.getElementById('joinBtn');
|
const jb=document.getElementById('joinBtn');
|
||||||
if(t.referralUrl)jb.href=t.referralUrl;
|
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('invIdBtn').textContent='#'+t.id;
|
||||||
document.getElementById('invIdJoin').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');
|
const note=document.getElementById('invQualNote');
|
||||||
if(t.reason==='leg'||t.reason==='global'){
|
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>`;
|
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>`;
|
||||||
|
|||||||
Reference in New Issue
Block a user