import Image from "next/image"; import Link from "next/link"; import { formatRupiah, formatDate } from "@/lib/utils"; interface TripCardProps { id: string; title: string; mountain: string; location: string; date: Date | string; price: number; maxParticipants: number; participantCount: number; organizerName: string; status: string; coverImage?: string | null; priority?: boolean; } export function TripCard({ id, title, mountain, location, date, price, maxParticipants, participantCount, organizerName, status, coverImage, priority, }: TripCardProps) { const spotsLeft = maxParticipants - participantCount; return (
{/* Cover Image */}
{coverImage ? ( {title} ) : (
🏔️
)} {status}
{/* Content */}

{title}

{mountain}

📍 {location}
📅{" "} {formatDate(date)}
👤{" "} {organizerName}
{formatRupiah(price)} 0 ? "text-secondary-600" : "text-amber-600" }`} > {spotsLeft > 0 ? `${spotsLeft} slot tersisa` : "Penuh"}
); }