a18hvcryt: Delete the signed-in person's own post from its menu
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { Ref } from "react";
|
||||
import type { CardPost } from "@/lib/feed-model";
|
||||
import { canDelete, type CardPost } from "@/lib/feed-model";
|
||||
import { Composer, type ComposerProps } from "./Composer";
|
||||
import { PostCard } from "./PostCard";
|
||||
|
||||
@@ -17,6 +17,11 @@ export interface FeedViewProps {
|
||||
likeBusy?: ReadonlySet<string>;
|
||||
likeErrors?: ReadonlySet<string>;
|
||||
onSignedOut?: () => void;
|
||||
/** The signed-in person's feed user id; delete is offered only on their own posts. */
|
||||
feedUserId?: string | null;
|
||||
onDelete?: (post: CardPost) => void;
|
||||
deleteBusy?: ReadonlySet<string>;
|
||||
deleteErrors?: ReadonlySet<string>;
|
||||
composer?: ComposerProps;
|
||||
sentinelRef?: Ref<HTMLDivElement>;
|
||||
now?: number;
|
||||
@@ -65,6 +70,10 @@ export function FeedView(p: FeedViewProps) {
|
||||
likeBusy={p.likeBusy?.has(post.key)}
|
||||
likeError={p.likeErrors?.has(post.key)}
|
||||
onSignedOut={p.onSignedOut}
|
||||
canDelete={canDelete(post, p.feedUserId)}
|
||||
onDelete={p.onDelete}
|
||||
deleteBusy={p.deleteBusy?.has(post.key)}
|
||||
deleteError={p.deleteErrors?.has(post.key)}
|
||||
/>)
|
||||
)}
|
||||
{p.loadMoreFailed ? (
|
||||
|
||||
Reference in New Issue
Block a user