import { Badge } from "@/components/ui/badge"; import { Dialog, DialogContent, DialogHeader, DialogTitle, } from "@/components/ui/dialog"; import { Separator } from "@/components/ui/separator"; import type { Audits } from "@/types/audit"; function JsonDisplay({ value }: { value: string | null | undefined }) { if (!value) return —; try { return (
{JSON.stringify(JSON.parse(value), null, 2)}
);
} catch {
return {value};
}
}
interface AuditDetailDialogProps {
audit: Audits | null;
open: boolean;
onClose: () => void;
}
export function AuditDetailDialog({
audit,
open,
onClose,
}: AuditDetailDialogProps) {
if (!audit) return null;
return (
);
}