"use client"; import { MapPin, ExternalLink } from "lucide-react"; import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Place } from "@/app/api/places/route"; interface PlaceCardProps { place: Place; } export default function PlaceCard({ place }: PlaceCardProps) { const handleOpenMaps = () => { let url: string; if (place.gmapLink && place.gmapLink !== "LIEN_GOOGLE_MAPS_A_INSERER") { url = place.gmapLink; } else { url = `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(place.location.address)}`; } window.open(url, "_blank"); }; return (
{place.name} {place.type && (

{place.type}

)}

{place.description}

{place.keywords && place.keywords.length > 0 && (
{place.keywords.map((keyword, index) => ( {keyword} ))}
)}
{place.location.address}
{place.contact && (
Contact: {place.contact}
)} {place.horaires && (

Horaires

{place.horaires}

)} {place.conseil && (

💡 Conseil pratique

{place.conseil}

)}
); }