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

@@ -1,12 +1,18 @@
import { Search } from 'lucide-react'
import { Input } from '../../../components/ui'
import { MEMBER_SEARCH_MIN } from './constants'
import { useGroupDetail } from './GroupDetailProvider'
import { MembersView } from './MembersView'
import { PendingView } from './PendingView'
import { SectionChips } from './SectionChips'
export function MembersWaitlistSection() {
const { listSection, searchFilter, setSearchFilter } = useGroupDetail()
const { listSection, searchFilter, setSearchFilter, attendeesTotal } = useGroupDetail()
// Con pocos miembros el buscador es ruido: se alcanza con recorrer la lista.
// Se quita del árbol en vez de esconderse, para no dejar un hueco en la fila.
// En Pendientes no cambia nada: ahí el volumen es el que es.
const showSearch = listSection === 'pending' || attendeesTotal > MEMBER_SEARCH_MIN
return (
// Una sola superficie: la lista va directo sobre el lavado, como la info
@@ -21,16 +27,18 @@ export function MembersWaitlistSection() {
<div className="flex flex-col gap-2.5 lg:flex-row lg:items-center lg:justify-between">
<SectionChips />
<div className="relative w-full sm:w-72 lg:shrink-0">
<Search className="pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-foreground/70" />
<Input
placeholder="Buscar por nombre o teléfono..."
value={searchFilter}
onChange={(e) => setSearchFilter(e.target.value)}
aria-label="Buscar en el listado"
className="h-11 rounded-lg border-transparent pl-9 shadow-xs"
/>
</div>
{showSearch ? (
<div className="relative w-full sm:w-72 lg:shrink-0">
<Search className="pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-foreground/70" />
<Input
placeholder="Buscar por nombre o teléfono..."
value={searchFilter}
onChange={(e) => setSearchFilter(e.target.value)}
aria-label="Buscar en el listado"
className="h-11 rounded-lg border-transparent pl-9 shadow-xs"
/>
</div>
) : null}
</div>
{/* Solo Pendientes lleva copia de apoyo: explica la diferencia entre