'use client'; import React from 'react'; import Link from 'next/link'; import Image from 'next/image'; import { motion } from 'framer-motion'; import { ExternalLink, Calendar, Tag } from 'lucide-react'; import { useLocale, useTranslations } from 'next-intl'; interface Project { slug: string; title: string; description: string; excerpt?: string; technologies: string[]; category?: string; date?: string; featured?: boolean; } interface PortfolioCardProps { project: Project; } const PortfolioCard = ({ project }: PortfolioCardProps) => { const locale = useLocale(); const t = useTranslations('portfolio.ui'); const displayTags = project.technologies; return ( {/* Image Container */} {/* Content */} {/* Project Info */} {project.date && ( {project.date} )} {displayTags && displayTags.length > 0 && ( {displayTags.length} {t('technologies')} )} {/* Title & Description */} {project.title} {project.excerpt || project.description} {/* Tags */} {displayTags.slice(0, 3).map((tag, index) => ( {tag} ))} {displayTags.length > 3 && ( +{displayTags.length - 3} more )} {/* Link Icon */} {/* Subtle Hover Border */} ); }; export default React.memo(PortfolioCard);
{project.excerpt || project.description}