fix: adjust padding based on FeedViewType in EntryList component

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei 2025-01-10 14:40:21 +08:00
parent f9c7e55ef9
commit f3f86b7c0d
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
1 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import { EmptyIcon } from "@follow/components/icons/empty.jsx"
import { useScrollViewElement } from "@follow/components/ui/scroll-area/hooks.js"
import type { FeedViewType } from "@follow/constants"
import { FeedViewType } from "@follow/constants"
import { useTypeScriptHappyCallback } from "@follow/hooks"
import { LRUCache } from "@follow/utils/lru-cache"
import type { Range, VirtualItem, Virtualizer } from "@tanstack/react-virtual"
@ -272,7 +272,11 @@ export const EntryList: FC<EntryListProps> = memo(
className="absolute left-0 top-0 w-full will-change-transform"
style={{
transform,
paddingTop: sticky ? "3.5rem" : undefined,
paddingTop: sticky
? view === FeedViewType.SocialMedia
? "3.5rem"
: "1.5rem"
: undefined,
}}
ref={rowVirtualizer.measureElement}
data-index={virtualRow.index}