import React from 'react'; import { motion } from 'framer-motion'; import { Flag, Globe, Info, MapPin, CheckCircle, PenLine, User } from 'lucide-react'; const ExampleCard = ({ example, index = 0 }) => { const cardVariants = { hidden: { opacity: 0, y: 10 }, visible: { opacity: 1, y: 0, transition: { duration: 0.3, delay: index * 0.05, }, }, }; const StatusIcon = example.status === 'verified' ? CheckCircle : PenLine; // Detect if this is a Chinese-to-English example (no taiwan field or isChineseToEnglish flag) const isChineseToEnglish = example.isChineseToEnglish || !example.taiwan; return (
{example.brand} {example.category}
{example.contributor && (
{example.contributor}
)}
{isChineseToEnglish ? ( <> {/* Chinese to English layout */}
Chinese (Original)
{example.mainland}
English Translation
{example.english}
) : ( <> {/* English to Chinese layout */}
English (Original)
{example.english}
Mainland China
{example.mainland}
Taiwan
{example.taiwan}
)} {example.description && (
Description
{example.description}
)}
); }; export default ExampleCard;