import AgentImage from '../components/AgentImage'; import { Agent } from './types'; export default function SharedAgentCard({ agent }: { agent: Agent }) { // Check if shared metadata exists and has properties (type is 'any' so we validate it's a non-empty object) const hasSharedMetadata = agent.shared_metadata && typeof agent.shared_metadata === 'object' && agent.shared_metadata !== null && Object.keys(agent.shared_metadata).length > 0; return (
{agent.description}
by {agent.shared_metadata.shared_by}
)} {agent.shared_metadata?.shared_at && (Shared on{' '} {new Date(agent.shared_metadata.shared_at).toLocaleString( 'en-US', { month: 'long', day: 'numeric', year: 'numeric', hour: '2-digit', minute: '2-digit', hour12: true, }, )}
)}Connected Tools