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
-12
View File
@@ -1,12 +0,0 @@
import { useMemo } from 'react';
import { Comment } from '@plebbit/plebbit-react-hooks';
import { flattenCommentsPages } from '@plebbit/plebbit-react-hooks/dist/lib/utils';
const useReplyCount = (comment: Comment) => {
const replies = comment?.replies;
const flattenedReplies = useMemo(() => flattenCommentsPages(replies), [replies]);
return flattenedReplies.length;
};
export default useReplyCount;