'use client' export interface InvitationCardProps { invitation: { id: string status: 'PENDING' | 'ACCEPTED' | 'DECLINED' message?: string createdAt: string label?: { id: string name: string logoUrl?: string } artist?: { id: string name: string user?: { avatarUrl?: string } } } viewType: 'label' | 'artist' onAccept?: (invitationId: string) => void onDecline?: (invitationId: string) => void onCancel?: (invitationId: string) => void } export function InvitationCard({ invitation, viewType, onAccept, onDecline, onCancel }: InvitationCardProps) { const formatDate = (dateString: string) => { const date = new Date(dateString) return date.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' }) } const statusColors = { PENDING: 'bg-yellow-900/20 text-yellow-400 border-yellow-800', ACCEPTED: 'bg-green-900/20 text-green-400 border-green-800', DECLINED: 'bg-red-900/20 text-red-400 border-red-800' } const isPending = invitation.status === 'PENDING' return (
{viewType === 'artist' ? 'Invited you to join their label' : 'Invitation sent'}
{invitation.message}
)} {/* Date */}{formatDate(invitation.createdAt)}
{/* Actions */} {isPending && (