tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
28
pulls
pipelines
tweaks to get the tabs working if cardBorderHidden
cozylittle.house
3 months ago
c606e52c
cb464682
+17
-21
4 changed files
expand all
collapse all
unified
split
app
(home-pages)
p
[didOrHandle]
PostsContent.tsx
ProfileHeader.tsx
ProfileLayout.tsx
ProfileTabs.tsx
+1
-1
app/(home-pages)/p/[didOrHandle]/PostsContent.tsx
···
68
68
}
69
69
70
70
return (
71
71
-
<div className="flex flex-col gap-2 text-left relative">
71
71
+
<div className="flex flex-col gap-3 text-left relative">
72
72
{allPosts.map((post) => (
73
73
<PostListing key={post.documents.uri} {...post} />
74
74
))}
+1
-1
app/(home-pages)/p/[didOrHandle]/ProfileHeader.tsx
···
83
83
? parseDescription(profileRecord.description)
84
84
: null}
85
85
</pre>
86
86
-
<div className=" w-full overflow-x-scroll mt-3 mb-6 ">
86
86
+
<div className=" w-full overflow-x-scroll py-3 mb-3 ">
87
87
<div
88
88
className={`grid grid-flow-col gap-2 mx-auto w-fit px-3 sm:px-4 ${props.popover ? "auto-cols-[164px]" : "auto-cols-[164px] sm:auto-cols-[240px]"}`}
89
89
>
+11
-15
app/(home-pages)/p/[didOrHandle]/ProfileLayout.tsx
···
3
3
import { useCardBorderHidden } from "components/Pages/useCardBorderHidden";
4
4
5
5
export function ProfileLayout(props: { children: React.ReactNode }) {
6
6
-
let borderHidden = useCardBorderHidden();
6
6
+
let cardBorderHidden = useCardBorderHidden();
7
7
return (
8
8
-
<div className="h-full">
9
9
-
<div
10
10
-
id="profile-content"
11
11
-
className={`
8
8
+
<div
9
9
+
id="profile-content"
10
10
+
className={`
12
11
${
13
13
-
borderHidden
12
12
+
cardBorderHidden
14
13
? ""
15
15
-
: "h-full border border-border-light rounded-lg overflow-y-scroll"
14
14
+
: "overflow-y-scroll h-full border border-border-light rounded-lg bg-bg-page"
16
15
}
17
17
-
max-w-prose
18
18
-
mx-auto
19
19
-
w-full
20
20
-
flex flex-col
21
21
-
text-center
16
16
+
max-w-prose mx-auto w-full
17
17
+
flex flex-col
18
18
+
text-center
22
19
`}
23
23
-
>
24
24
-
{props.children}
25
25
-
</div>
20
20
+
>
21
21
+
{props.children}
26
22
</div>
27
23
);
28
24
}
+4
-4
app/(home-pages)/p/[didOrHandle]/ProfileTabs.tsx
···
13
13
const currentTab = (segment || "posts") as ProfileTabType;
14
14
const [scrollPosWithinTabContent, setScrollPosWithinTabContent] = useState(0);
15
15
const [headerHeight, setHeaderHeight] = useState(0);
16
16
-
17
16
useEffect(() => {
18
17
let headerHeight =
19
18
document.getElementById("profile-header")?.clientHeight || 0;
20
19
setHeaderHeight(headerHeight);
21
20
22
22
-
const profileContent = document.getElementById("profile-content");
21
21
+
const profileContent = cardBorderHidden
22
22
+
? document.getElementById("home-content")
23
23
+
: document.getElementById("profile-content");
23
24
const handleScroll = () => {
24
25
if (profileContent) {
25
26
setScrollPosWithinTabContent(
···
37
38
}, []);
38
39
39
40
const baseUrl = `/p/${props.didOrHandle}`;
40
40
-
const bgColor = "255 255 255";
41
41
-
// const bgColor = !cardBorderHidden ? "var(--bg-leaflet)" : "var(--bg-page)";
41
41
+
const bgColor = cardBorderHidden ? "var(--bg-leaflet)" : "var(--bg-page)";
42
42
43
43
return (
44
44
<div className="flex flex-col w-full sticky top-3 sm:top-4 z-20 sm:px-4 px-3">