LiquidAI/LFM2-MCP
39
1import type React from "react";2 3interface ResultBlockProps {4 error?: string;5 result?: unknown;6}7 8const ResultBlock: React.FC<ResultBlockProps> = ({9 error,10 result,11}) => (12 <div13 className={14 error15 ? "bg-red-900 border border-red-600 rounded p-3"16 : "bg-gray-700 border border-gray-600 rounded p-3"17 }18 >19 {error ? <p className="text-red-300 text-sm">Error: {error}</p> : null}20 <pre className="text-sm text-gray-300 whitespace-pre-wrap overflow-auto mt-2">21 {result !== undefined && result !== null 22 ? (typeof result === "object" ? JSON.stringify(result, null, 2) : String(result))23 : "No result"}24 </pre>25 </div>26);27 28export default ResultBlock;29 