fix: fix feed component
This commit is contained in:
@@ -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({
|
||||
</span>
|
||||
) : null}
|
||||
</div>
|
||||
{enableFollow && post.author_handle && !post.viewer_follows_author ? (
|
||||
<FeedFollowButton
|
||||
handle={post.author_handle}
|
||||
followsYou={!!post.author_follows_viewer}
|
||||
/>
|
||||
) : null}
|
||||
<PostCardMenu post={post} onDelete={onDelete} />
|
||||
</header>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user