fix(post): reply quote link couldn't render in posts with link and no content

This commit is contained in:
Tom (plebeius.eth)
2024-07-22 16:10:59 +02:00
parent 7ff8af7fcd
commit ddb462b95e
3 changed files with 66 additions and 69 deletions
+2 -2
View File
@@ -341,7 +341,7 @@ const Reply = ({ openReplyModal, postReplyCount, reply, roles }: PostProps) => {
post = editedComment;
}
const { author, cid, content, link, postCid, subplebbitAddress } = post || {};
const { author, cid, link, postCid, subplebbitAddress } = post || {};
const isRouteLinkToReply = useLocation().pathname.startsWith(`/p/${subplebbitAddress}/c/${cid}`);
const { hidden } = useHide({ cid });
@@ -356,7 +356,7 @@ const Reply = ({ openReplyModal, postReplyCount, reply, roles }: PostProps) => {
>
<PostInfo openReplyModal={openReplyModal} post={post} postReplyCount={postReplyCount} roles={roles} />
{link && !hidden && isValidURL(link) && <PostMedia post={post} />}
{content && !hidden && <PostMessage post={post} />}
{!hidden && <PostMessage post={post} />}
</div>
</div>
);