// ----------------------------------------------------------------------------- // Lou-Ka — Agrégateur de logements à louer (province de Québec) // Auteur : Simon-Pierre Boucher — contact@spboucher.ai // components/ListingCard.tsx : carte d'annonce (grille de résultats) // ----------------------------------------------------------------------------- import { Link } from "react-router-dom"; import { Listing, fmtPrice, sourceName } from "../api"; export default function ListingCard({ l }: { l: Listing }) { const img = l.images && l.images.length > 0 ? l.images[0] : null; return (
{img ? ( {l.title} ) : (
🏠
)} {l.unit_type && {l.unit_type}} {l.images.length > 1 && ( 📷 {l.images.length} )}
{fmtPrice(l.price, l.price_label)} {l.price != null && / mois}
{l.title || l.address}
{l.sector && {l.sector}} {l.sector && l.city && } {l.city && {l.city}}
{sourceName(l.source)} {l.availability && {l.availability}}
); }