diff --git a/components/feed/home-feed.tsx b/components/feed/home-feed.tsx index 7a04cb22..54785582 100644 --- a/components/feed/home-feed.tsx +++ b/components/feed/home-feed.tsx @@ -20,7 +20,7 @@ import { useCallback, useEffect, useRef, useState } from "react"; import { useWindowVirtualizer } from "@tanstack/react-virtual"; import { Loader2 } from "lucide-react"; import { feed, type Post, type UserSummary } from "@/lib/social"; -import { PostCard } from "@/components/social/post/post-card"; +import { PostScrollCard } from "@/components/social/post/post-scroll-card"; import { NewUsersStrip } from "./new-users-strip"; const PAGE = 10; @@ -74,7 +74,7 @@ export function HomeFeed() { const virtualizer = useWindowVirtualizer({ count: items.length, - estimateSize: () => 460, + estimateSize: () => 680, overscan: 4, scrollMargin: offsetTop, }); @@ -135,7 +135,7 @@ export function HomeFeed() { style={{ transform: `translateY(${vi.start - offsetTop}px)` }} >
- +
); diff --git a/components/feed/new-users-strip.tsx b/components/feed/new-users-strip.tsx index 217c42e7..c0792113 100644 --- a/components/feed/new-users-strip.tsx +++ b/components/feed/new-users-strip.tsx @@ -28,7 +28,7 @@ export function NewUsersStrip({ users }: { users: UserSummary[] }) { New to Prabhupāda Says

- Welcome them — follow the devotees who just joined. + Welcome them by sending a follow request.

diff --git a/components/social/post/post-card.tsx b/components/social/post/post-card.tsx index 6757f8cf..5d7cdba1 100644 --- a/components/social/post/post-card.tsx +++ b/components/social/post/post-card.tsx @@ -30,18 +30,13 @@ import { UserAvatar } from "@/components/ui/user-avatar"; import { timeAgo } from "@/lib/time"; import { PostActionsFooter } from "./post-actions-footer"; import { PostCardMenu } from "./post-card-menu"; -import { FeedFollowButton } from "./feed-follow-button"; export function PostCard({ post, onDelete, - enableFollow = false, }: { post: Post; onDelete?: (id: string) => void; - /** Home-feed only: show a Follow / Follow back button in the header for - * authors the viewer doesn't already follow. */ - enableFollow?: boolean; }) { const sourceHref = hasHighlight(post.source_url) || !post.caption @@ -99,12 +94,6 @@ export function PostCard({ {timeAgo(post.created_at)}

- {enableFollow && authorHandle && !post.viewer_follows_author ? ( - - ) : null} diff --git a/components/social/post/post-scroll-card.tsx b/components/social/post/post-scroll-card.tsx index c312285e..23b72830 100644 --- a/components/social/post/post-scroll-card.tsx +++ b/components/social/post/post-scroll-card.tsx @@ -39,6 +39,7 @@ import { useAuth } from "@/components/auth/auth-provider"; import { postSourceHref, quoteCardBgStyle } from "./post-card-shared"; import { PostActionsFooter } from "./post-actions-footer"; import { PostCardMenu } from "./post-card-menu"; +import { FeedFollowButton } from "./feed-follow-button"; import { UpdateBackgroundModal } from "../update-background-modal"; import { MentionsDrawer } from "../mentions-drawer"; @@ -46,10 +47,14 @@ export function PostScrollCard({ post, onDelete, onUpdated, + enableFollow = false, }: { post: Post; onDelete?: (id: string) => void; onUpdated?: (updated: Post) => void; + /** Home-feed only: show a Follow / Follow back button in the header for + * authors the viewer doesn't already follow. Off everywhere else. */ + enableFollow?: boolean; }) { const images = post.images ?? []; const hasImages = images.length > 0; @@ -136,6 +141,12 @@ export function PostScrollCard({ ) : null} + {enableFollow && post.author_handle && !post.viewer_follows_author ? ( + + ) : null}