story-research-zapwall/components/ProfileSeriesBlock.tsx
2026-01-06 14:17:55 +01:00

29 lines
918 B
TypeScript

import Link from 'next/link'
import { SeriesSection } from './SeriesSection'
interface ProfileSeriesBlockProps {
currentPubkey: string
onSelectSeries: (seriesId: string | undefined) => void
selectedSeriesId?: string | undefined
}
export function ProfileSeriesBlock({ currentPubkey, onSelectSeries, selectedSeriesId }: ProfileSeriesBlockProps): React.ReactElement {
return (
<div className="mb-6">
<h3 className="text-lg font-semibold mb-2">Séries</h3>
<SeriesSection
authorPubkey={currentPubkey}
onSelect={onSelectSeries}
{...(selectedSeriesId ? { selectedId: selectedSeriesId } : {})}
/>
{selectedSeriesId && (
<div className="mt-2 text-sm text-blue-600">
<Link href={`/series/${selectedSeriesId}`} className="underline">
Ouvrir la page de la série sélectionnée
</Link>
</div>
)}
</div>
)
}