diff --git a/src/components/AssetStreamPage.tsx b/src/components/AssetStreamPage.tsx index 77836d8..a9c3983 100644 --- a/src/components/AssetStreamPage.tsx +++ b/src/components/AssetStreamPage.tsx @@ -1,7 +1,5 @@ -import { useEffect, useRef, useState } from "react"; import type { PostScope } from "../types/post"; import { MessageStream } from "./messageStream/MessageStream"; -import { SectionHeader } from "./SectionHeader"; type AssetStreamPageProps = { title: string; @@ -9,50 +7,9 @@ type AssetStreamPageProps = { }; export function AssetStreamPage({ title, scope }: AssetStreamPageProps) { - // Telegram-style sticky page title: once the main heading scrolls up behind - // the global header, a floating pill slides in so users always know which - // page they're on. - const sentinelRef = useRef(null); - const [pinned, setPinned] = useState(false); - - useEffect(() => { - const el = sentinelRef.current; - if (!el) return; - const io = new IntersectionObserver( - ([entry]) => setPinned(!entry.isIntersecting), - // Inset the top by the sticky header height so the pill appears exactly - // when the heading disappears behind it. - { rootMargin: "-64px 0px 0px 0px", threshold: 0 }, - ); - io.observe(el); - return () => io.disconnect(); - }, []); - return (
-
- -
-
- -
-
- - - {title} - -
-
- - +
); } diff --git a/src/components/messageStream/FilterChips.tsx b/src/components/messageStream/FilterChips.tsx index fb8e9fe..2de153e 100644 --- a/src/components/messageStream/FilterChips.tsx +++ b/src/components/messageStream/FilterChips.tsx @@ -31,7 +31,7 @@ export function FilterChips({ type, onTypeChange }: FilterChipsProps) { ].join(" "); return ( -
+
- updateParam("type", v)} /> + {/* Title + filters stay pinned below the global header so users always + see which page they're on and can switch filters while scrolling. */} +
+ {title ? ( +
+ +
+ ) : null} + updateParam("type", v)} /> +
{isInitialLoad ? (