/** * Component: Author Detail Card * Documentation: documentation/frontend/components.md * * Hero section for the author detail page with circular portrait, * name, collapsible biography, and genre pills. */ 'use client'; import React, { useState } from 'react'; import Image from 'next/image'; import { AuthorDetail } from '@/lib/hooks/useAuthors'; import { WatchAuthorButton } from '@/components/ui/WatchButton'; interface AuthorDetailCardProps { author: AuthorDetail; } export function AuthorDetailCard({ author }: AuthorDetailCardProps) { const [expanded, setExpanded] = useState(false); const hasLongDescription = (author.description?.length || 0) > 300; return (
{/* Circular Portrait */}
{author.image ? ( {author.name} ) : (
)}
{/* Author Info */}

{author.name}

{/* Genre Pills */} {author.genres.length > 0 && (
{author.genres.map(genre => ( {genre} ))}
)} {/* Actions row: Audible link + Watch button */}
{author.audibleUrl && ( View on Audible )}
{/* Description */} {author.description && (

{author.description}

{hasLongDescription && ( )}
)}
); } export function AuthorDetailSkeleton() { return (
{/* Portrait skeleton */}
{/* Info skeleton */}
); }