teqo/src/components/campaign/PlazaZoneNeighborhoodsCard.tsx
Francisco Ignácio Fontoura Solla e497fc3982 Deliver B8 F1 plaza zone neighborhoods catalog and absorb simplify debts.
Ship static zone-to-neighborhood mapping for Salvador/Camaçari Praças-zona, overview UI card, tests/fixture, and roadmap/plan updates including F2 prep follow-ups from capture-review-debts.
2026-07-21 16:08:34 -03:00

39 lines
1.2 KiB
TypeScript

import {
plazaZoneNeighborhoodEntryForSlug,
plazaZoneNeighborhoodSourceLabel,
} from '@/lib/plazaZoneNeighborhoods'
export const PlazaZoneNeighborhoodsCard = ({ plazaSlug }: { plazaSlug: string }) => {
const entry = plazaZoneNeighborhoodEntryForSlug(plazaSlug)
if (!entry?.neighborhoods.length) return null
const { neighborhoods, source } = entry
return (
<section
aria-labelledby="plaza-zone-neighborhoods-title"
className="flex flex-col gap-4 rounded-xl border p-4"
>
<div className="flex flex-col gap-1">
<h2 id="plaza-zone-neighborhoods-title" className="text-base font-medium">
Bairros desta Praça
</h2>
<p className="text-sm text-muted-foreground">
{neighborhoods.length}{' '}
{neighborhoods.length === 1 ? 'bairro' : 'bairros'} ·{' '}
{plazaZoneNeighborhoodSourceLabel(source)}
</p>
</div>
<ul className="grid gap-1.5 sm:grid-cols-2">
{neighborhoods.map((neighborhood) => (
<li
key={neighborhood}
className="rounded-md border px-3 py-2 text-sm text-foreground"
>
{neighborhood}
</li>
))}
</ul>
</section>
)
}