diff --git a/src/app/(applicant)/applicant/page.tsx b/src/app/(applicant)/applicant/page.tsx index 59728f1..0f5fee8 100644 --- a/src/app/(applicant)/applicant/page.tsx +++ b/src/app/(applicant)/applicant/page.tsx @@ -19,6 +19,7 @@ import { CompetitionTimelineSidebar } from '@/components/applicant/competition-t import { MentoringRequestCard } from '@/components/applicant/mentoring-request-card' import { MentorConversationCard } from '@/components/applicant/mentor-conversation-card' import { AttendingMembersCard } from '@/components/applicant/attending-members-card' +import { LunchBanner } from '@/components/applicant/lunch-banner' import { AnimatedCard } from '@/components/shared/animated-container' import { ProjectLogoUpload } from '@/components/shared/project-logo-upload' import { Progress } from '@/components/ui/progress' @@ -403,6 +404,9 @@ export default function ApplicantDashboardPage() { ))} + {/* Lunch banner (auto-hides when lunch event disabled or unconfigured) */} + + {/* Grand finale attendee roster (auto-hides until confirmation status is CONFIRMED) */} diff --git a/src/components/applicant/lunch-banner.tsx b/src/components/applicant/lunch-banner.tsx new file mode 100644 index 0000000..f1abaa1 --- /dev/null +++ b/src/components/applicant/lunch-banner.tsx @@ -0,0 +1,54 @@ +'use client' + +import { trpc } from '@/lib/trpc/client' +import { Card, CardContent } from '@/components/ui/card' +import { Calendar, MapPin, Salad, Clock } from 'lucide-react' + +export function LunchBanner({ programId }: { programId: string }) { + const { data: event } = trpc.lunch.getEventForMember.useQuery({ programId }) + if (!event) return null + const fmt = new Intl.DateTimeFormat(undefined, { + timeZone: 'Europe/Monaco', + dateStyle: 'long', + timeStyle: 'short', + }) + const eventAt = event.eventAt ? new Date(event.eventAt) : null + const deadline = event.changeDeadline ? new Date(event.changeDeadline) : null + const deadlinePassed = deadline ? new Date() > deadline : false + + return ( + + + + Lunch event + {eventAt && ( + + {fmt.format(eventAt)}{' '} + (Monaco time) + + )} + {event.venue && ( + + {event.venue} + + )} + {deadline && ( + + + {deadlinePassed ? 'Picks closed' : 'Picks close'}: {fmt.format(deadline)} + + )} + {event.notes && ( +
+ + Notes from organizers + +

{event.notes}

+
+ )} +
+
+ ) +}