import { useState } from "react"; export default function InfraPlot() { // Chainlit injects `props` as a global (same as Counter example uses props.count) const url = props?.url || ""; const title = props?.title || "Infrastructure & Latency Plot"; const [isExpanded, setIsExpanded] = useState(false); if (!url) return (
⚠️ No URL found
        {JSON.stringify(props, null, 2)}
      
); return (
{/* Header */}
📊 {title}
↗ Open
{/* iframe */}