import { format } from 'date-fns'; import { ExternalLink } from 'lucide-react'; import { Panel } from '@/components/ui/panel'; import { WeeklySnapshotCard } from '@/components/analysis/weekly-snapshot-card'; import type { RecentDevelopments } from '@/lib/types'; type RecentDevelopmentsSectionProps = { recentDevelopments: RecentDevelopments; }; function formatDate(value: string) { const parsed = new Date(value); return Number.isNaN(parsed.getTime()) ? value : format(parsed, 'MMM dd, yyyy'); } export function RecentDevelopmentsSection(props: RecentDevelopmentsSectionProps) { return (
{props.recentDevelopments.items.length === 0 ? (

No recent development items are available for this ticker yet.

) : (
{props.recentDevelopments.items.map((item) => (

{item.kind} ยท {formatDate(item.publishedAt)}

{item.title}

{item.source}

{item.summary ?? 'No summary is available for this development item yet.'}

{item.accessionNumber ?? 'No accession'}

{item.url ? ( Open filing ) : null}
))}
)}
); }