import type { Article } from '@/types/nostr' import { ArticleCard } from './ArticleCard' interface ArticlesListProps { articles: Article[] allArticles: Article[] loading: boolean error: string | null onUnlock: (article: Article) => void unlockedArticles: Set } function LoadingState() { return (

Loading articles...

) } function ErrorState({ message }: { message: string }) { return (

{message}

) } function EmptyState({ hasAny }: { hasAny: boolean }) { return (

{hasAny ? 'No articles match your search or filters.' : 'No articles found. Check back later!'}

) } export function ArticlesList({ articles, allArticles, loading, error, onUnlock, unlockedArticles, }: ArticlesListProps) { if (loading) { return } if (error) { return } if (articles.length === 0) { return 0} /> } return ( <>
Showing {articles.length} of {allArticles.length} article{allArticles.length !== 1 ? 's' : ''}
{articles.map((article) => ( ))}
) }