import type { Article } from '@/types/nostr' import { AuthorCard } from './AuthorCard' import { t } from '@/lib/i18n' interface AuthorsListProps { authors: Article[] allAuthors: Article[] loading: boolean error: string | null } function LoadingState() { return (

{t('common.loading.authors')}

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

{message}

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

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

) } export function AuthorsList({ authors, allAuthors, loading, error }: AuthorsListProps) { if (loading) { return } if (error) { return } if (authors.length === 0) { return 0} /> } return ( <>
Showing {authors.length} of {allAuthors.length} author{allAuthors.length !== 1 ? 's' : ''}
{authors.map((author) => ( ))}
) }