fix(post): reply backlink didn't appear in post info immediately after replying to it

This commit is contained in:
Tom (plebeius.eth)
2024-08-31 14:57:11 +02:00
parent 09a14416c8
commit 0f6b922516
3 changed files with 23 additions and 16 deletions
+4 -2
View File
@@ -199,10 +199,12 @@ const PostInfo = ({ openReplyModal, post, postReplyCount = 0, roles, isHidden }:
)}
</span>
<PostMenuDesktop post={post} />
{replyCount > 0 &&
{cid &&
parentCid &&
replies &&
replies.map((reply: Comment, index: number) => reply?.parentCid === cid && <ReplyQuotePreview key={index} isBacklinkReply={true} backlinkReply={reply} />)}
replies.map(
(reply: Comment, index: number) => reply?.parentCid === cid && reply?.cid && <ReplyQuotePreview key={index} isBacklinkReply={true} backlinkReply={reply} />,
)}
</div>
);
};