import { Building2, MapPin, Calendar } from 'lucide-react'; import { useCompanyPreview } from '@/hooks/preview/useCompanyPreview'; import { Badge } from '@/components/ui/badge'; interface CompanyPreviewCardProps { slug: string; } export function CompanyPreviewCard({ slug }: CompanyPreviewCardProps) { const { data: company, isLoading } = useCompanyPreview(slug); if (isLoading) { return (
); } if (!company) { return (
Company not found
); } const formatCompanyType = (type: string) => { return type.split('_').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' '); }; return (
{/* Header with logo */}
{company.logo_url ? ( {company.name} ) : (
)}

{company.name}

{formatCompanyType(company.company_type)}
{/* Location and Founded */}
{company.headquarters_location && (
{company.headquarters_location}
)} {company.founded_year && (
Founded {company.founded_year}
)}

Click to view full details

); }