import Image from "next/image"; import Link from "next/link"; import { formatRupiah } from "@/lib/utils"; import { formatTripCalendarDateRangeLong } from "@/lib/trip-dates"; import { categoryMeta } from "@/lib/activity-category"; import type { ActivityCategory } from "@/app/generated/prisma/enums"; interface TripCardProps { id: string; title: string; category: ActivityCategory; destination: string; location: string; date: Date | string; endDate?: Date | string | null; price: number; maxParticipants: number; participantCount: number; organizerName: string; status: string; coverImage?: string | null; priority?: boolean; isVerifiedOrganizer?: boolean; } export function TripCard({ id, title, category, destination, location, date, endDate, price, maxParticipants, participantCount, organizerName, status, coverImage, priority, isVerifiedOrganizer, }: TripCardProps) { const spotsLeft = maxParticipants - participantCount; const isSmallGroup = maxParticipants <= 10; const meta = categoryMeta(category); return (
{destination}