'use client' import { trpc } from '@/lib/trpc/client' import { cn } from '@/lib/utils' import { Skeleton } from '@/components/ui/skeleton' import { Badge } from '@/components/ui/badge' export type RoundUnassignedQueueProps = { roundId: string requiredReviews?: number } export function RoundUnassignedQueue({ roundId, requiredReviews = 3 }: RoundUnassignedQueueProps) { const { data: unassigned, isLoading } = trpc.roundAssignment.unassignedQueue.useQuery( { roundId, requiredReviews }, { refetchInterval: 15_000 }, ) return (

Unassigned Projects

Projects with fewer than {requiredReviews} jury assignments

{isLoading ? (
{[1, 2, 3].map((i) => )}
) : unassigned && unassigned.length > 0 ? (
{unassigned.map((project: any) => (

{project.title}

{project.competitionCategory || 'No category'} {project.teamName && ` \u00b7 ${project.teamName}`}

{project.assignmentCount || 0} / {requiredReviews}
))}
) : (

All projects have sufficient assignments

)}
) }