'use client'; import { motion } from 'framer-motion'; import { Award, ExternalLink } from 'lucide-react'; import type { Certification } from '@/lib/constants/products'; interface CertificationListProps { certifications: Certification[]; } export function CertificationList({ certifications }: CertificationListProps) { if (certifications.length === 0) return null; return (
{certifications.map((cert, index) => { const link = cert.link && cert.link !== '#' ? cert.link : null; const className = 'inline-flex items-center gap-2 rounded-full border border-border-primary bg-bg-elevated px-4 py-2 text-sm text-text-secondary shadow-sm transition-all hover:border-border-secondary hover:shadow-md'; const motionProps = { initial: { opacity: 0, scale: 0.95 }, whileInView: { opacity: 1, scale: 1 }, viewport: { once: true, margin: '-50px' }, transition: { duration: 0.3, delay: index * 0.05 }, className, }; const inner = ( <> {cert.name} {cert.issuer} {link && } ); return link ? ( {inner} ) : ( {inner} ); })}
); }