import { useRouter } from 'next/router'
import Head from 'next/head'
import { useEffect, useState } from 'react'
import { fetchAuthorPresentationFromPool } from '@/lib/articlePublisherHelpers'
import { getSeriesByAuthor } from '@/lib/seriesQueries'
import { getAuthorSponsoring } from '@/lib/sponsoring'
import { nostrService } from '@/lib/nostr'
import type { AuthorPresentationArticle, Series } from '@/types/nostr'
import { PageHeader } from '@/components/PageHeader'
import { Footer } from '@/components/Footer'
import { t } from '@/lib/i18n'
import Link from 'next/link'
import { SeriesCard } from '@/components/SeriesCard'
function AuthorPageHeader({ presentation }: { presentation: AuthorPresentationArticle | null }) {
if (!presentation) {
return null
}
return (
{presentation.title || t('author.presentation')}
{presentation.content}
)
}
function SponsoringSummary({ totalSponsoring }: { totalSponsoring: number }) {
const totalBTC = totalSponsoring / 100_000_000
return (