"use client" import { Heart } from "lucide-react" import { useState } from "react" import { currentUser } from "@/lib/mock" import type { Comment } from "@/lib/types" import { useRequireAuth } from "@/lib/use-require-auth" import { useAuthStore } from "@/store/auth" import { Avatar, AvatarFallback, AvatarImage } from "./ui/avatar" import { Button } from "./ui/button" import { Textarea } from "./ui/textarea" interface PostCommentsProps { initialComments: Comment[] postId: string } export function PostComments({ initialComments, postId }: PostCommentsProps) { const [comments, setComments] = useState(initialComments) const [content, setContent] = useState("") const { requireAuth } = useRequireAuth() const user = useAuthStore((s) => s.user) return (
还没有评论
) : ({comment.content}