| // src/components/conference/ConferenceOverview.tsx | |
| import { Calendar, Clock, MapPin, Users, DollarSign, Globe, Mail, Phone, Award, Target, BookOpen, CheckCircle, AlertCircle } from "lucide-react"; | |
| import { format } from "@/lib/date"; | |
| interface ConferenceOverviewProps { | |
| conference: { | |
| description: string; | |
| theme: string; | |
| topics: string[]; | |
| startDate: string; | |
| endDate: string; | |
| registrationDeadline: string; | |
| paperSubmissionDeadline: string; | |
| notificationDate: string; | |
| cameraReadyDeadline: string; | |
| venue: string; | |
| city: string; | |
| country: string; | |
| website: string; | |
| email: string; | |
| phone: string; | |
| organizerName: string; | |
| organizerEmail: string; | |
| fees: { | |
| earlyBird: number; | |
| regular: number; | |
| late: number; | |
| student: number; | |
| currency: string; | |
| }; | |
| }; | |
| isRegistered: boolean; | |
| canRegister: boolean; | |
| onRegister: () => void; | |
| } | |
| export function ConferenceOverview({ conference, isRegistered, canRegister, onRegister }: ConferenceOverviewProps) { | |
| const now = new Date(); | |
| const registrationDeadline = new Date(conference.registrationDeadline); | |
| const paperDeadline = new Date(conference.paperSubmissionDeadline); | |
| const isRegistrationOpen = now < registrationDeadline; | |
| const isPaperSubmissionOpen = now < paperDeadline; | |
| return ( | |
| <div className="space-y-6"> | |
| <div className="grid grid-cols-1 lg:grid-cols-3 gap-6"> | |
| {/* Main Content */} | |
| <div className="lg:col-span-2 space-y-6"> | |
| {/* Description */} | |
| <div className="bg-white dark:bg-gray-800 rounded-xl p-6 shadow-sm border border-gray-200 dark:border-gray-700"> | |
| <h2 className="text-xl font-semibold mb-4">About the Conference</h2> | |
| <p className="text-gray-600 dark:text-gray-400 leading-relaxed"> | |
| {conference.description} | |
| </p> | |
| </div> | |
| {/* Theme */} | |
| <div className="bg-white dark:bg-gray-800 rounded-xl p-6 shadow-sm border border-gray-200 dark:border-gray-700"> | |
| <h2 className="text-xl font-semibold mb-4 flex items-center gap-2"> | |
| <Target className="w-5 h-5 text-primary" /> | |
| Conference Theme | |
| </h2> | |
| <p className="text-lg font-medium text-primary mb-3">{conference.theme}</p> | |
| </div> | |
| {/* Topics */} | |
| <div className="bg-white dark:bg-gray-800 rounded-xl p-6 shadow-sm border border-gray-200 dark:border-gray-700"> | |
| <h2 className="text-xl font-semibold mb-4">Topics of Interest</h2> | |
| <div className="flex flex-wrap gap-2"> | |
| {conference.topics.map((topic) => ( | |
| <span | |
| key={topic} | |
| className="px-3 py-1.5 text-sm bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-full" | |
| > | |
| {topic} | |
| </span> | |
| ))} | |
| </div> | |
| </div> | |
| {/* Important Dates */} | |
| <div className="bg-white dark:bg-gray-800 rounded-xl p-6 shadow-sm border border-gray-200 dark:border-gray-700"> | |
| <h2 className="text-xl font-semibold mb-4 flex items-center gap-2"> | |
| <Clock className="w-5 h-5 text-primary" /> | |
| Important Dates | |
| </h2> | |
| <div className="space-y-3"> | |
| <div className="flex justify-between items-center py-2 border-b border-gray-100 dark:border-gray-700"> | |
| <span className="text-gray-600 dark:text-gray-400">Paper Submission Deadline</span> | |
| <span className="font-medium">{format(paperDeadline, "MMMM d, yyyy")}</span> | |
| </div> | |
| <div className="flex justify-between items-center py-2 border-b border-gray-100 dark:border-gray-700"> | |
| <span className="text-gray-600 dark:text-gray-400">Notification of Acceptance</span> | |
| <span className="font-medium">{format(new Date(conference.notificationDate), "MMMM d, yyyy")}</span> | |
| </div> | |
| <div className="flex justify-between items-center py-2 border-b border-gray-100 dark:border-gray-700"> | |
| <span className="text-gray-600 dark:text-gray-400">Camera Ready Submission</span> | |
| <span className="font-medium">{format(new Date(conference.cameraReadyDeadline), "MMMM d, yyyy")}</span> | |
| </div> | |
| <div className="flex justify-between items-center py-2"> | |
| <span className="text-gray-600 dark:text-gray-400">Registration Deadline</span> | |
| <span className="font-medium">{format(registrationDeadline, "MMMM d, yyyy")}</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| {/* Sidebar */} | |
| <div className="space-y-6"> | |
| {/* Registration Card */} | |
| <div className="bg-gradient-to-br from-primary to-secondary rounded-xl p-6 text-white"> | |
| <h3 className="text-xl font-bold mb-2">Register Now</h3> | |
| <p className="text-white/80 mb-4">Secure your spot at the conference</p> | |
| {isRegistered ? ( | |
| <div className="flex items-center gap-2 bg-white/20 rounded-lg p-3"> | |
| <CheckCircle className="w-5 h-5" /> | |
| <span>You are registered!</span> | |
| </div> | |
| ) : canRegister && isRegistrationOpen ? ( | |
| <button | |
| onClick={onRegister} | |
| className="w-full bg-white text-primary py-2 rounded-lg font-medium hover:bg-white/90 transition" | |
| > | |
| Register Now | |
| </button> | |
| ) : !isRegistrationOpen ? ( | |
| <div className="flex items-center gap-2 bg-white/20 rounded-lg p-3"> | |
| <AlertCircle className="w-5 h-5" /> | |
| <span>Registration closed</span> | |
| </div> | |
| ) : ( | |
| <button | |
| onClick={onRegister} | |
| disabled | |
| className="w-full bg-white/50 text-white py-2 rounded-lg font-medium cursor-not-allowed" | |
| > | |
| Login to Register | |
| </button> | |
| )} | |
| </div> | |
| {/* Registration Fees */} | |
| <div className="bg-white dark:bg-gray-800 rounded-xl p-6 shadow-sm border border-gray-200 dark:border-gray-700"> | |
| <h3 className="text-lg font-semibold mb-4 flex items-center gap-2"> | |
| <DollarSign className="w-5 h-5 text-primary" /> | |
| Registration Fees | |
| </h3> | |
| <div className="space-y-3"> | |
| <div className="flex justify-between items-center"> | |
| <span className="text-gray-600 dark:text-gray-400">Early Bird</span> | |
| <span className="font-bold">{conference.fees.currency} {conference.fees.earlyBird}</span> | |
| </div> | |
| <div className="flex justify-between items-center"> | |
| <span className="text-gray-600 dark:text-gray-400">Regular</span> | |
| <span className="font-bold">{conference.fees.currency} {conference.fees.regular}</span> | |
| </div> | |
| <div className="flex justify-between items-center"> | |
| <span className="text-gray-600 dark:text-gray-400">Late</span> | |
| <span className="font-bold">{conference.fees.currency} {conference.fees.late}</span> | |
| </div> | |
| <div className="flex justify-between items-center pt-2 border-t border-gray-200 dark:border-gray-700"> | |
| <span className="text-gray-600 dark:text-gray-400">Student</span> | |
| <span className="font-bold">{conference.fees.currency} {conference.fees.student}</span> | |
| </div> | |
| </div> | |
| </div> | |
| {/* Contact Info */} | |
| <div className="bg-white dark:bg-gray-800 rounded-xl p-6 shadow-sm border border-gray-200 dark:border-gray-700"> | |
| <h3 className="text-lg font-semibold mb-4">Contact</h3> | |
| <div className="space-y-3"> | |
| <div className="flex items-center gap-2 text-sm"> | |
| <Mail className="w-4 h-4 text-gray-400" /> | |
| <a href={`mailto:${conference.email}`} className="text-primary hover:underline"> | |
| {conference.email} | |
| </a> | |
| </div> | |
| {conference.phone && ( | |
| <div className="flex items-center gap-2 text-sm"> | |
| <Phone className="w-4 h-4 text-gray-400" /> | |
| <span>{conference.phone}</span> | |
| </div> | |
| )} | |
| <div className="flex items-center gap-2 text-sm"> | |
| <Globe className="w-4 h-4 text-gray-400" /> | |
| <a href={conference.website} target="_blank" rel="noopener noreferrer" className="text-primary hover:underline"> | |
| Conference Website | |
| </a> | |
| </div> | |
| </div> | |
| </div> | |
| {/* Organizer */} | |
| <div className="bg-white dark:bg-gray-800 rounded-xl p-6 shadow-sm border border-gray-200 dark:border-gray-700"> | |
| <h3 className="text-lg font-semibold mb-2">Organized by</h3> | |
| <p className="font-medium">{conference.organizerName}</p> | |
| <a href={`mailto:${conference.organizerEmail}`} className="text-sm text-primary hover:underline"> | |
| {conference.organizerEmail} | |
| </a> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| ); | |
| } | |
Xet Storage Details
- Size:
- 9.44 kB
- Xet hash:
- 09d07ca4581b0121102c3521696c33cee65449e49915c9f1767678b3723a9a25
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.