"use client" import Link from "next/link" import { motion } from "framer-motion" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Badge } from "@/components/ui/badge" import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" import { Lead } from "@/types" import { ArrowRight } from "lucide-react" const statusStyles: Record = { open: "bg-white/40 text-gray-700 dark:text-gray-300 border-gray-300/50 dark:border-gray-600/50", contacted: "bg-red-500/10 text-red-600 dark:text-red-400 border-red-500/20", pending: "bg-blue-900/10 text-blue-900 dark:text-blue-300 border-blue-900/20", closed: "bg-blue-400/10 text-blue-600 dark:text-blue-300 border-blue-400/20", ignored: "bg-black/10 text-black dark:text-gray-300 border-black/20 dark:border-black/40", } interface RecentLeadsTableProps { leads: Lead[] } export function RecentLeadsTable({ leads }: RecentLeadsTableProps) { return ( Recent Leads View all
{leads.map((lead, i) => ( ))}
Company Contact Status Assigned Date
{lead.companyName} {lead.contactName} {lead.status.charAt(0).toUpperCase() + lead.status.slice(1)} {lead.assignedUser ? (
{lead.assignedUser.name[0]} {lead.assignedUser.name}
) : ( Unassigned )}
{new Date(lead.createdAt).toLocaleDateString()}
) }