diff --git a/src/components/post-desktop/post-desktop.tsx b/src/components/post-desktop/post-desktop.tsx index ee553d4d..e497971b 100644 --- a/src/components/post-desktop/post-desktop.tsx +++ b/src/components/post-desktop/post-desktop.tsx @@ -344,7 +344,7 @@ const Reply = ({ openReplyModal, postReplyCount, reply, roles }: PostProps) => { const PostDesktop = ({ openReplyModal, post, roles, showAllReplies, showReplies = true }: PostProps) => { const { t } = useTranslation(); - const { author, cid, content, link, pinned, postCid, replyCount, subplebbitAddress } = post || {}; + const { author, cid, content, link, pinned, postCid, subplebbitAddress } = post || {}; const { isDescription, isRules } = post || {}; // custom properties, not from api const params = useParams(); const location = useLocation(); @@ -357,6 +357,7 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies, showReplies const replies = useReplies(post); const visiblelinksCount = useCountLinksInReplies(post, 5); const totalLinksCount = useCountLinksInReplies(post); + const replyCount = replies?.length; const repliesCount = pinned ? replyCount : replyCount - 5; const linksCount = pinned ? totalLinksCount : totalLinksCount - visiblelinksCount; const { showOmittedReplies, setShowOmittedReplies } = useShowOmittedReplies(); @@ -391,7 +392,7 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies, showReplies {!isHidden && !content &&
} {!isHidden && content &&