import { Link } from 'react-router-dom'; import { MessageCircle, Check, X, Loader2, Calendar, MapPin } from 'lucide-react'; import { MATCH_STATUS } from '../../constants'; /** * Match card for matches list page * Shows match details with accept/reject/chat actions */ const MatchCard = ({ match, onAccept, onReject, onOpenChat, processing }) => { const isIncoming = !match.isInitiator && match.status === MATCH_STATUS.PENDING; const isOutgoing = match.isInitiator && match.status === MATCH_STATUS.PENDING; const isAccepted = match.status === MATCH_STATUS.ACCEPTED; return (
{match.partner.username}

{match.partner.firstName && match.partner.lastName ? `${match.partner.firstName} ${match.partner.lastName}` : match.partner.username}

@{match.partner.username}

{match.event.name}
{match.event.location}
{match.type === 'auto' ? ( Auto ) : ( Manual )} {isIncoming && ( Incoming Request )} {isOutgoing && ( Sent Request )} {isAccepted && ( Active Match )}
{isIncoming && match.type === 'manual' && ( <> )} {isIncoming && match.type === 'auto' && ( Go to Records )} {isOutgoing && match.type === 'manual' && ( )} {isOutgoing && match.type === 'auto' && ( Go to Records )} {isAccepted && match.slug && ( )} {isAccepted && !match.slug && ( Chat not available yet )}
); }; export default MatchCard;