import { Suspense } from 'react'
import Link from 'next/link'
import { api } from '@/lib/trpc/server'
import { Button } from '@/components/ui/button'
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from '@/components/ui/card'
import { Badge } from '@/components/ui/badge'
import { Skeleton } from '@/components/ui/skeleton'
import {
Plus,
FileText,
Video,
Link as LinkIcon,
File,
Eye,
Pencil,
ExternalLink,
} from 'lucide-react'
import { formatDate } from '@/lib/utils'
const resourceTypeIcons = {
PDF: FileText,
VIDEO: Video,
DOCUMENT: File,
LINK: LinkIcon,
OTHER: File,
}
const cohortColors = {
ALL: 'bg-gray-100 text-gray-800',
SEMIFINALIST: 'bg-blue-100 text-blue-800',
FINALIST: 'bg-purple-100 text-purple-800',
}
async function LearningResourcesList() {
const caller = await api()
const { data: resources } = await caller.learningResource.list({
perPage: 50,
})
if (resources.length === 0) {
return (
Start by adding your first learning resource
No resources yet
Manage educational resources for jury members