import { formatDateEST } from "@/lib/timezoneUtils";

export default function OwnerUpdatesSection({ data }: { data: any[] }) {
  return (
    <div className="space-y-4">
      <h2 className="text-xl font-bold text-foreground border-b pb-2">Owner Updates</h2>
      <div className="space-y-3">
        {data.map((item) => (
          <div key={item.id} className="p-4 bg-muted/30 rounded-lg border">
            <p className="text-xs text-muted-foreground">
              {item.created_at ? formatDateEST(item.created_at) : "-"}
            </p>
            <p className="text-sm text-foreground mt-1 whitespace-pre-wrap">
              {item.content?.replace(/<[^>]*>/g, "")}
            </p>
          </div>
        ))}
      </div>
    </div>
  );
}
