feat: hide post

This commit is contained in:
gosangam
2026-06-14 19:52:16 +05:30
parent 7585e6cb31
commit 79f0bd9223
5 changed files with 154 additions and 2 deletions
+9 -1
View File
@@ -47,11 +47,15 @@ export function PostScrollCard({
post,
onDelete,
onUpdated,
onHiddenChange,
enableFollow = false,
}: {
post: Post;
onDelete?: (id: string) => void;
onUpdated?: (updated: Post) => void;
/** Owner-only: forwarded to the overflow menu so a parent can react to a
* hide/unhide (e.g. drop the post from the Hidden tab on unhide). */
onHiddenChange?: (id: string, hidden: boolean) => 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;
@@ -147,7 +151,11 @@ export function PostScrollCard({
followsYou={!!post.author_follows_viewer}
/>
) : null}
<PostCardMenu post={post} onDelete={onDelete} />
<PostCardMenu
post={post}
onDelete={onDelete}
onHiddenChange={onHiddenChange}
/>
</header>
{/* Media — image carousel or gradient-with-quote */}