import ContentImage from '@/components/Image' import UserAvatar from '@/components/UserAvatar' import { cn } from '@/lib/utils' import type { Event } from 'nostr-tools' /** * Long-form / wiki–style card cover: NIP-23 `image` tag when present, otherwise the author avatar. */ export default function ArticleCardCoverImage({ event, imageUrl, autoLoadMedia, layout, hideImageIfError = false }: { event: Event imageUrl?: string autoLoadMedia: boolean layout: 'stacked' | 'row' /** Passed through to {@link ContentImage} when an `image` tag URL exists. */ hideImageIfError?: boolean }) { const trimmed = imageUrl?.trim() if (trimmed && autoLoadMedia) { return ( ) } if (trimmed) return null return (
) }