add number of comments in PostList

This commit is contained in:
Václav Pavlín 2025-09-10 13:31:26 +02:00
parent df2efac6c3
commit e5db41bfc8
No known key found for this signature in database
GPG Key ID: B378FB31BB6D89A5

View File

@ -7,6 +7,7 @@ import {
usePermissions,
useUserVotes,
useAuth,
usePostComments,
} from '@/hooks';
import { EVerificationStatus } from '@/types/identity';
import { Button } from '@/components/ui/button';
@ -325,6 +326,11 @@ const PostList = () => {
className="text-xs"
showBadge={false}
/>
<span></span>
<span>
<MessageSquare className="inline w-3 h-3 mr-1" />
{usePostComments(post.id).totalCount} comments
</span>
<ShareButton
url={`${window.location.origin}/post/${post.id}`}
title={post.title}