"use client" import * as React from "react" import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, } from "@/components/ui/dialog" import { Check, X, Info, AlertTriangle } from "lucide-react" import { Badge } from "@/components/ui/badge" import Link from "next/link" export function WrongbookDialog({ problems, children }: { problems: { id: string; name: string; status: string }[]; children?: React.ReactNode }) { return ( {children ? children : ( )} 全部错题集
{problems.map((item) => ( ))}
ID 题目名称 状态
{item.id} {item.name} {(() => { if (item.status === "AC") { return ( {item.status} ) } else if (item.status === "WA") { return ( {item.status} ) } else if (["RE", "CE", "MLE", "TLE"].includes(item.status)) { return ( {item.status} ) } else { return ( {item.status} ) } })()}
) }