import { cn } from "@/lib/utils"; import prisma from "@/lib/prisma"; import { Locale } from "@/generated/client"; import { Label } from "@/components/ui/label"; import { Separator } from "@/components/ui/separator"; import { formatSubmissionDate } from "@/config/locale"; import { getLabelForLanguage } from "@/config/language"; import { getColorClassForStatus } from "@/config/status"; import { PreDetail } from "@/components/content/pre-detail"; import { ViewSolutionButton } from "./view-solution-button"; import { getLocale, getTranslations } from "next-intl/server"; import { MdxRenderer } from "@/components/content/mdx-renderer"; import { MdxComponents } from "@/components/content/mdx-components"; import { DetailForm } from "@/features/problems/detail/components/form"; import { AnalyzeButton } from "@/features/problems/detail/components/analyze-button"; interface DetailTableProps { submissionId: string; } export const DetailTable = async ({ submissionId }: DetailTableProps) => { const t = await getTranslations("DetailsPage"); const s = await getTranslations("StatusMessage"); const locale = (await getLocale()) as Locale; const submission = await prisma.submission.findUnique({ where: { id: submissionId, }, }); const judge = await prisma.judge.findUnique({ where: { submissionId }, select: { compileOutput: true, }, }); if (!submission) return (