revert, replyCount should come from api

This commit is contained in:
Tom (plebeius.eth)
2024-07-07 14:36:14 +02:00
parent 44e518a3ad
commit ff72365151
5 changed files with 22 additions and 30 deletions
+1 -3
View File
@@ -13,7 +13,6 @@ import useEditCommentPrivileges from '../../hooks/use-author-privileges';
import useCountLinksInReplies from '../../hooks/use-count-links-in-replies';
import useHide from '../../hooks/use-hide';
import useReplies from '../../hooks/use-replies';
import useReplyCount from '../../hooks/use-reply-count';
import useStateString from '../../hooks/use-state-string';
import CommentMedia from '../comment-media';
import EditMenu from '../edit-menu/edit-menu';
@@ -339,7 +338,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, subplebbitAddress } = post || {};
const { author, cid, content, link, pinned, postCid, replyCount, subplebbitAddress } = post || {};
const { isDescription, isRules } = post || {}; // custom properties, not from api
const params = useParams();
const location = useLocation();
@@ -350,7 +349,6 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies, showReplies
const isHidden = hidden && !isInPostPageView;
const replies = useReplies(post);
const replyCount = useReplyCount(post);
const visiblelinksCount = useCountLinksInReplies(post, 5);
const totalLinksCount = useCountLinksInReplies(post);
const repliesCount = pinned ? replyCount : replyCount - 5;