import { CalendarDays, Globe, Tag, Clock, AlarmClock } from "lucide-react"; import { Conference } from "@/types/conference"; import { formatDistanceToNow, parseISO, isValid } from "date-fns"; const ConferenceCard = ({ title, full_name, date, place, deadline, timezone, tags = [], link, note, abstract_deadline, }: Conference) => { const deadlineDate = deadline && deadline !== 'TBD' ? parseISO(deadline) : null; const daysLeft = deadlineDate && isValid(deadlineDate) ? formatDistanceToNow(deadlineDate, { addSuffix: true }) : 'TBD'; // Determine countdown color based on days remaining const getCountdownColor = () => { if (!deadlineDate || !isValid(deadlineDate)) return "text-neutral-600"; const daysRemaining = Math.ceil((deadlineDate.getTime() - new Date().getTime()) / (1000 * 60 * 60 * 24)); if (daysRemaining <= 7) return "text-red-600"; if (daysRemaining <= 30) return "text-orange-600"; return "text-green-600"; }; return (