import { useState } from "react"; import { ChevronDown, ChevronUp, Eye } from "lucide-react"; import type { ImageResult } from "@/types"; import { getImageUrl } from "@/services/api"; interface ImageResultCardProps { result: ImageResult; index: number; } export function ImageResultCard({ result, index }: ImageResultCardProps) { const [expanded, setExpanded] = useState(false); const hasError = !!result.error; return (
{result.filename}
{hasError ? ({typeof result.error === "string" ? result.error : JSON.stringify(result.error)}
) : (Uploaded Image
Detection Outputs
{label}
))}