// components/vendors/SidebarCards.tsx import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' import { Button } from '@/components/ui/button' import Link from 'next/link' interface SidebarCardsProps { description?: string | null events?: Array<{ id: string name: string date: Date | null }> timeline: { createdAt: Date bookedDate?: Date | null depositDueDate?: Date | null finalPaymentDue?: Date | null } vendorId: string } const formatDate = (date?: Date | null): string => { if (!date) return '—' return new Date(date).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric', }) } export function SidebarCards({ description, events, timeline, vendorId }: SidebarCardsProps) { return (
{description}
{event.name}
{event.date && ({formatDate(event.date)}
)}