feat(comments): migrate to backend API
This commit is contained in:
@@ -1,17 +1,12 @@
|
||||
"use client"
|
||||
|
||||
import { useCommentStore } from "@/store/comments"
|
||||
import { MessageCircle } from "lucide-react"
|
||||
|
||||
interface PostCommentCountProps {
|
||||
postId: string
|
||||
count: number
|
||||
}
|
||||
|
||||
export function PostCommentCount({ postId }: PostCommentCountProps) {
|
||||
const count = useCommentStore(
|
||||
(state) => state.comments.filter((comment) => comment.postId === postId).length,
|
||||
)
|
||||
|
||||
export function PostCommentCount({ count }: PostCommentCountProps) {
|
||||
return (
|
||||
<span className="flex items-center gap-1">
|
||||
<MessageCircle className="h-4 w-4" />
|
||||
|
||||
Reference in New Issue
Block a user