"use client" import Link from "next/link" import { motion } from "framer-motion" import { Restaurant, Visit } from "@/app/types" function priceLabel(range: number) { return "€".repeat(range) } function formatDate(iso: string) { return new Date(iso).toLocaleDateString("en-GB", { day: "numeric", month: "short", year: "numeric", }) } interface Props { restaurant: Restaurant latestVisit: Visit index: number } export default function RestaurantCard({ restaurant, latestVisit, index }: Props) { return (
{/* Amber glow on hover */}

{restaurant.name}

{restaurant.city}, {restaurant.country}

{latestVisit.rating} /10
{priceLabel(restaurant.price_range)}
{latestVisit.dishes[0] && (

“{latestVisit.dishes[0]}”

)}
{restaurant.cuisine.slice(0, 3).map((tag) => ( {tag} ))}
{formatDate(latestVisit.date)}
{restaurant.visits.length > 1 && (

{restaurant.visits.length} visits

)}
) }