"use client"
import Link from "next/link"
import { ArrowUpRight, ChevronDown, ChevronUp, ChevronsUpDown } from "lucide-react"
import { VerifiedBadge } from "@/components/signals/verified-badge"
import { isRecognizedEvaluator, type EvaluatorGroup } from "@/lib/evaluators"
import { cn } from "@/lib/utils"
export type EvaluatorTableSortCol = "name" | "evals" | "verified"
interface EvaluatorTableProps {
rows: EvaluatorGroup[]
sortCol: EvaluatorTableSortCol
sortDir: "asc" | "desc"
onSort: (col: EvaluatorTableSortCol) => void
/** When true, the verified filter is active — propagate it into the link. */
verifiedOnly?: boolean
}
export function EvaluatorTable({ rows, sortCol, sortDir, onSort, verifiedOnly }: EvaluatorTableProps) {
function SortIcon({ col }: { col: EvaluatorTableSortCol }) {
if (sortCol !== col) return
|
{row.name}
|
{verifiedOnly ? (
{row.evalCount.toLocaleString()}
|
{!verifiedOnly && (
{row.verifiedCount > 0 ? (
{row.verifiedCount.toLocaleString()}
|
)}
Open
|