// ----------------------------------------------------------------------------- // Lou-Ka — Location court terme // components/CtListingCard.tsx : carte d'hébergement (grille /court-terme) // ----------------------------------------------------------------------------- import { Link } from "react-router-dom"; import { CtListing, ctSourceName, fmtNight } from "../ctapi"; import { IcoCamera } from "./Icons"; import SmartImg from "./SmartImg"; export default function CtListingCard({ l }: { l: CtListing }) { const img = l.images && l.images.length > 0 ? l.images[0] : null; const meta = [ l.capacity ? `${l.capacity} pers.` : "", l.bedrooms ? `${l.bedrooms} ch.` : "", l.details?.spa ? "Spa" : "", l.details?.waterfront ? "Bord de l'eau" : "", ].filter(Boolean); return (
{l.property_type && {l.property_type}} {l.images.length > 1 && ( {l.images.length} )}
{fmtNight(l.price_night, l.price_label)} {l.price_night != null && / nuit} {l.rating != null && ( ★ {l.rating.toLocaleString("fr-CA", { maximumFractionDigits: 1 })} {l.reviews ? ` (${l.reviews})` : ""} )}
{l.title}
{l.city && {l.city}} {l.city && l.region && } {l.region && {l.region}}
{ctSourceName(l.source)} {meta.length > 0 && {meta.join(" · ")}}
); }