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:
@@ -23,7 +23,7 @@ const base = import.meta.env.BASE_URL;
|
||||
<div class="max-w-5xl mx-auto px-4 pt-6 pb-2 flex items-center gap-4">
|
||||
<div>
|
||||
<h1 class="text-2xl font-bold text-white mb-0.5">@{handle}</h1>
|
||||
<nav class="flex gap-4 mt-1">
|
||||
<nav id="profile-subnav" class="flex gap-4 mt-1">
|
||||
<a href={`${base}u/${handle}/`} class="text-sm text-[--accent]">Feed</a>
|
||||
<a href={`${base}u/${handle}/stats/`} class="text-sm text-zinc-400 hover:text-white transition-colors">Stats</a>
|
||||
<a href={`${base}u/${handle}/athlete/`} class="text-sm text-zinc-400 hover:text-white transition-colors">Athlete</a>
|
||||
@@ -32,3 +32,13 @@ const base = import.meta.env.BASE_URL;
|
||||
</div>
|
||||
<ActivityFeed {base} filterHandle={handle} profileIndexUrl={shardUrl} client:only="svelte" />
|
||||
</Base>
|
||||
<script define:vars={{ handle }}>
|
||||
function applyMeCheck(me) {
|
||||
if (me === handle) document.getElementById('profile-subnav')?.remove();
|
||||
}
|
||||
if (window.__bincioMe !== undefined) {
|
||||
applyMeCheck(window.__bincioMe);
|
||||
} else {
|
||||
window.addEventListener('bincio:me', e => applyMeCheck(e.detail), { once: true });
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user