fix: the user feed shows a page that nests again "feed stats athlete" that should be shown only if you are browsing a user that is not you

This commit is contained in:
Davide Scaini
2026-04-09 10:35:58 +02:00
parent cf7c71b8a3
commit 509557ed6f
4 changed files with 45 additions and 3 deletions
+12
View File
@@ -313,6 +313,14 @@ try {
});
</script>
<!-- Single-user: expose the handle synchronously so profile pages can detect "own profile" -->
{singleHandle && (
<script define:vars={{ singleHandle }}>
window.__bincioMe = singleHandle;
window.dispatchEvent(new CustomEvent('bincio:me', { detail: singleHandle }));
</script>
)}
<!-- User widget: only needed for multi-user (single-user nav links are static) -->
{!singleHandle && (
<script define:vars={{ baseUrl }}>
@@ -322,6 +330,10 @@ try {
if (!r.ok) return;
const user = await r.json();
// Expose handle for profile pages
window.__bincioMe = user.handle;
window.dispatchEvent(new CustomEvent('bincio:me', { detail: user.handle }));
// Show @handle link → /u/{handle}/
const meEl = document.getElementById('nav-me');
if (meEl) {