refactor: remove unused attendee detail components and provider

This commit is contained in:
Jose Selesan
2026-09-30 13:37:42 -03:00
parent 27bff32e76
commit 4e86096653
30 changed files with 1710 additions and 475 deletions

View File

@@ -0,0 +1,39 @@
import { MessageCircle, Phone } from 'lucide-react'
import { formatPhoneDisplay } from '../../lib/format'
import { cn } from '../../lib/utils'
import { ACTION_BUTTON_CLASS } from './actionButton'
import { useAttendeeDetail } from './AttendeeDetailProvider'
export function AttendeeContactActions() {
const { attendee } = useAttendeeDetail()
const phone = attendee?.phone
if (!phone) return null
// Los links van con los dígitos crudos: wa.me y tel: no entienden formatos.
const digits = phone.replace(/\D/g, '')
const label = formatPhoneDisplay(phone) ?? phone
return (
<div className="flex gap-2.5">
<a
href={`https://wa.me/${digits}`}
target="_blank"
rel="noopener noreferrer"
aria-label={`Abrir WhatsApp con ${label}`}
className={cn(ACTION_BUTTON_CLASS, 'flex-1')}
>
<MessageCircle className="size-4 text-accent" aria-hidden="true" />
WhatsApp
</a>
<a
href={`tel:${digits}`}
aria-label={`Llamar a ${label}`}
className={cn(ACTION_BUTTON_CLASS, 'flex-1')}
>
<Phone className="size-4 text-accent" aria-hidden="true" />
Llamar
</a>
</div>
)
}