import { ThumbsUp } from "lucide-react"; import type { Comment, User } from "../types"; import { formatRelativeTime, formatAbsoluteUTC } from "../utils"; import { CommentText } from "./CommentText"; interface CommentListProps { author: User; createdAt: string | Date; comments: Comment[]; } export function CommentList({ author, createdAt, comments }: CommentListProps) { return ( <>
{author.avatar_url ? ( avatar ) : null}
{author.nickname}
发布于 {formatRelativeTime(createdAt)}
); }