'use client' import { useSession } from 'next-auth/react' import Link from 'next/link' import type { Route } from 'next' import { trpc } from '@/lib/trpc/client' import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' import { Button } from '@/components/ui/button' import { Skeleton } from '@/components/ui/skeleton' import { ApplicantCompetitionTimeline } from '@/components/applicant/competition-timeline' import { ArrowLeft, FileText, Calendar } from 'lucide-react' import { toast } from 'sonner' export default function ApplicantCompetitionsPage() { const { data: session } = useSession() const { data: myProject, isLoading } = trpc.applicant.getMyDashboard.useQuery(undefined, { enabled: !!session, }) if (isLoading) { return (
) } const competitionId = myProject?.project?.programId return (

Competition Timeline

Track your progress through competition rounds

{!competitionId ? (

No Active Competition

You don't have an active project in any competition yet. Submit your application when a competition opens.

) : (
Quick Actions {myProject?.openRounds && myProject.openRounds.length > 0 && (

{myProject.openRounds.length} submission window {myProject.openRounds.length !== 1 ? 's' : ''} currently open

)}
Timeline Info
Current Status: {myProject?.currentStatus || 'Unknown'}
{myProject?.project && ( <>
Project: {myProject.project.title}
{myProject.project.submittedAt && (
Submitted: {new Date(myProject.project.submittedAt).toLocaleDateString()}
)} )}
)}
) }