fix: remove auto-redirect from demo space for logged-in users

Signed-in users can now browse the demo space without being
automatically redirected to their personal space.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-03-02 22:27:06 -08:00
parent ebdda1e443
commit 9ed9757a2a
1 changed files with 0 additions and 23 deletions

View File

@ -2298,29 +2298,6 @@
}
})();
// ── Auto-space resolution (logged-in users on demo → personal space) ──
(function() {
try {
var raw = localStorage.getItem('encryptid_session');
if (!raw) return;
var session = JSON.parse(raw);
if (!session || !session.claims || !session.claims.username) return;
if (communitySlug !== 'demo') return;
fetch('/api/spaces/auto-provision', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + session.accessToken,
'Content-Type': 'application/json'
}
}).then(function(r) { return r.json(); })
.then(function(data) {
if (data.slug) {
window.location.replace(rspaceNavUrl(data.slug, 'rspace'));
}
}).catch(function() {});
} catch(e) {}
})();
// ── Welcome overlay (first visit to demo) ──
(function() {
if (communitySlug !== 'demo') return;