import React from 'react'; import { ProjectItem, Language } from '../types'; import { ExternalLink, Code, Gamepad2, Car, BarChart3 } from 'lucide-react'; interface Props { project: ProjectItem; lang: Language; } const ProjectCard: React.FC = ({ project, lang }) => { // Select a placeholder icon fallback const getIcon = () => { switch (project.imageType) { case 'car': return ; case 'game': return ; case 'chart': return ; default: return ; } }; return (
{/* Image Area - Increased height for "Rich" feel */}
{project.imageUrl ? ( {project.title[lang]} ) : (
{getIcon()}
)} {/* Dark Gradient Overlay for text readability at bottom */}
{/* Type badge */}
{project.imageType || 'Dev'}
{/* Content Area */}

{project.title[lang]}

{project.description[lang]}

{/* Decorative dots representing tech stack */}
{project.link && ( {project.linkText ? project.linkText[lang] : (lang === 'en' ? 'View details' : '查看详情')} )}
); }; export default ProjectCard;