import { Check, RotateCcw } from "lucide-react"; import { Button } from "@/components/ui/button"; import type { ReviewComment } from "./types"; interface CommentThreadProps { comments: ReviewComment[]; onResolve: (commentId: string) => void; onUnresolve: (commentId: string) => void; } export function CommentThread({ comments, onResolve, onUnresolve }: CommentThreadProps) { return (
{comments.map((comment) => (
{comment.author} {formatTime(comment.createdAt)} {comment.resolved && ( Resolved )}
{comment.resolved ? ( ) : ( )}

{comment.body}

))}
); } function formatTime(iso: string): string { const d = new Date(iso); return d.toLocaleTimeString(undefined, { hour: "2-digit", minute: "2-digit" }); }