From 0043e2bdb6f86ac82278889ee18a290abd5f24fa Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Mon, 25 Nov 2024 19:43:51 +0100 Subject: [PATCH] fix(post): deleted or removed post could show reply form --- src/components/post-desktop/post-desktop.tsx | 6 +++++- src/components/post-mobile/post-mobile.tsx | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/post-desktop/post-desktop.tsx b/src/components/post-desktop/post-desktop.tsx index 97aec2d5..177df99a 100644 --- a/src/components/post-desktop/post-desktop.tsx +++ b/src/components/post-desktop/post-desktop.tsx @@ -165,7 +165,11 @@ const PostInfo = ({ openReplyModal, post, postReplyCount = 0, roles, isHidden }: !cid && e.preventDefault()}> c/ - openReplyModal && openReplyModal(cid, postCid, subplebbitAddress)}> + openReplyModal && !(deleted || removed) && openReplyModal(cid, postCid, subplebbitAddress)} + > {shortCid} diff --git a/src/components/post-mobile/post-mobile.tsx b/src/components/post-mobile/post-mobile.tsx index 1d1dad70..92d42ed4 100644 --- a/src/components/post-mobile/post-mobile.tsx +++ b/src/components/post-mobile/post-mobile.tsx @@ -167,7 +167,11 @@ const PostInfoAndMedia = ({ openReplyModal, post, postReplyCount = 0, roles }: P !cid && e.preventDefault()}> c/ - openReplyModal && openReplyModal(cid, postCid, subplebbitAddress)}> + openReplyModal && !(deleted || removed) && openReplyModal(cid, postCid, subplebbitAddress)} + > {shortCid.slice(0, -4)}