import Image from 'next/image' import { t } from '@/lib/i18n' import type { AuthorPresentationArticle } from '@/types/nostr' export function AuthorPageHeader(params: { presentation: AuthorPresentationArticle | null }): React.ReactElement | null { if (!params.presentation) { return null } const authorName = getAuthorNameFromPresentationTitle(params.presentation.title) return (
) } function getAuthorNameFromPresentationTitle(title: string): string { const trimmed = title.replace(/^Présentation de /, '').trim() return trimmed.length > 0 ? trimmed : title } function AuthorProfileImage(params: { bannerUrl: string | undefined }): React.ReactElement | null { if (!params.bannerUrl) { return null } return (
{t('author.profilePicture')}
) } function AuthorHeaderTitle(params: { authorName: string }): React.ReactElement { return (

{params.authorName}

{t('author.profileNote')}

) } function AuthorPresentationSection(params: { title: string; text: string | undefined }): React.ReactElement | null { if (!params.text) { return null } return (

{params.title}

{params.text}

) }