From c606e52cf1e1b3424c082340692fbbcde4a84a69 Mon Sep 17 00:00:00 2001 From: celine Date: Sun, 14 Dec 2025 09:39:34 -0500 Subject: [PATCH] tweaks to get the tabs working if cardBorderHidden --- .../p/[didOrHandle]/PostsContent.tsx | 2 +- .../p/[didOrHandle]/ProfileHeader.tsx | 2 +- .../p/[didOrHandle]/ProfileLayout.tsx | 26 ++++++++----------- .../p/[didOrHandle]/ProfileTabs.tsx | 8 +++--- 4 files changed, 17 insertions(+), 21 deletions(-) diff --git a/app/(home-pages)/p/[didOrHandle]/PostsContent.tsx b/app/(home-pages)/p/[didOrHandle]/PostsContent.tsx index d8fbea2d..eb841838 100644 --- a/app/(home-pages)/p/[didOrHandle]/PostsContent.tsx +++ b/app/(home-pages)/p/[didOrHandle]/PostsContent.tsx @@ -68,7 +68,7 @@ export const ProfilePostsContent = (props: { } return ( -
+
{allPosts.map((post) => ( ))} diff --git a/app/(home-pages)/p/[didOrHandle]/ProfileHeader.tsx b/app/(home-pages)/p/[didOrHandle]/ProfileHeader.tsx index 2a658cc3..959ed0ff 100644 --- a/app/(home-pages)/p/[didOrHandle]/ProfileHeader.tsx +++ b/app/(home-pages)/p/[didOrHandle]/ProfileHeader.tsx @@ -83,7 +83,7 @@ export const ProfileHeader = (props: { ? parseDescription(profileRecord.description) : null} -
+
diff --git a/app/(home-pages)/p/[didOrHandle]/ProfileLayout.tsx b/app/(home-pages)/p/[didOrHandle]/ProfileLayout.tsx index 9661c35c..a298dec3 100644 --- a/app/(home-pages)/p/[didOrHandle]/ProfileLayout.tsx +++ b/app/(home-pages)/p/[didOrHandle]/ProfileLayout.tsx @@ -3,26 +3,22 @@ import { useCardBorderHidden } from "components/Pages/useCardBorderHidden"; export function ProfileLayout(props: { children: React.ReactNode }) { - let borderHidden = useCardBorderHidden(); + let cardBorderHidden = useCardBorderHidden(); return ( -
-
- {props.children} -
+ > + {props.children}
); } diff --git a/app/(home-pages)/p/[didOrHandle]/ProfileTabs.tsx b/app/(home-pages)/p/[didOrHandle]/ProfileTabs.tsx index 2b9f32ce..4609a0a1 100644 --- a/app/(home-pages)/p/[didOrHandle]/ProfileTabs.tsx +++ b/app/(home-pages)/p/[didOrHandle]/ProfileTabs.tsx @@ -13,13 +13,14 @@ export const ProfileTabs = (props: { didOrHandle: string }) => { const currentTab = (segment || "posts") as ProfileTabType; const [scrollPosWithinTabContent, setScrollPosWithinTabContent] = useState(0); const [headerHeight, setHeaderHeight] = useState(0); - useEffect(() => { let headerHeight = document.getElementById("profile-header")?.clientHeight || 0; setHeaderHeight(headerHeight); - const profileContent = document.getElementById("profile-content"); + const profileContent = cardBorderHidden + ? document.getElementById("home-content") + : document.getElementById("profile-content"); const handleScroll = () => { if (profileContent) { setScrollPosWithinTabContent( @@ -37,8 +38,7 @@ export const ProfileTabs = (props: { didOrHandle: string }) => { }, []); const baseUrl = `/p/${props.didOrHandle}`; - const bgColor = "255 255 255"; - // const bgColor = !cardBorderHidden ? "var(--bg-leaflet)" : "var(--bg-page)"; + const bgColor = cardBorderHidden ? "var(--bg-leaflet)" : "var(--bg-page)"; return (
-- 2.51.2