From cce3b060b3605a554f97b9baeaccd86089e2161f Mon Sep 17 00:00:00 2001 From: martbost Date: Sun, 16 Aug 2026 13:05:43 -0500 Subject: [PATCH] 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 --- public/join.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/join.js b/public/join.js index 961a3c4..88685ac 100644 --- a/public/join.js +++ b/public/join.js @@ -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=`
You were invited by Member #${esc(d.id)}, who's already qualified. So your entry goes to Member #${esc(t.id)} — 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 #${esc(t.id)} in the dApp.
`;