'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 (
Track your progress through competition rounds
You don't have an active project in any competition yet. Submit your application when a competition opens.
{myProject.openRounds.length} submission window {myProject.openRounds.length !== 1 ? 's' : ''} currently open
)}