import React from 'react'; import { CodeBlock } from '../CodeBlock/CodeBlock'; interface ResultDisplayProps { result: string | object | null | undefined; // Allow objects for JSON stringify title?: string; successMessage?: string; isJson?: boolean; // Flag to stringify objects } export const ResultDisplay: React.FC = ({ result, title = 'Result', successMessage, isJson = false, }) => { return (
{title}:
{successMessage && (
{successMessage}
)}
); };