From 0604b5b452aab605f3d35e66490ab5742a7d0672 Mon Sep 17 00:00:00 2001 From: Jure <44338+hoornet@users.noreply.github.com> Date: Wed, 25 Mar 2026 10:40:41 +0100 Subject: [PATCH] Fix profile banner and avatar layout Remove avatar-overlaps-banner approach that caused squashed avatars. Banner and avatar are now cleanly separated with a border between them. Banner hides entirely on load error instead of leaving empty gray space. Avatar uses inline dimensions to prevent flex compression. --- src/components/profile/ProfileView.tsx | 47 ++++++++++++++------------ 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/src/components/profile/ProfileView.tsx b/src/components/profile/ProfileView.tsx index 6078756..122f922 100644 --- a/src/components/profile/ProfileView.tsx +++ b/src/components/profile/ProfileView.tsx @@ -34,6 +34,7 @@ export function ProfileView() { const [profileTab, setProfileTab] = useState<"notes" | "articles" | "media">("notes"); const [bannerLightbox, setBannerLightbox] = useState(false); const [bannerLoaded, setBannerLoaded] = useState(false); + const [bannerError, setBannerError] = useState(false); const isFollowing = follows.includes(pubkey); const { mutedPubkeys, mute, unmute } = useMuteStore(); @@ -62,6 +63,8 @@ export function ProfileView() { useEffect(() => { setLoading(true); setProfileTab("notes"); + setBannerLoaded(false); + setBannerError(false); fetchUserNotesNIP65(pubkey).then((events) => { setNotes(events); setLoading(false); @@ -151,7 +154,7 @@ export function ProfileView() { {!editing && (